Search
<span>L</span><span>e</span><span>t</span><span>t</span><span>e</span><span>r</span><span>s</span>
20.2.2019
Did you see this Facebook crap?
"Why do I need a 4Ghz quadcore to run facebook?" This is why. A single word split up into 11 HTML DOM elements to avoid adblockers. pic.twitter.com/Zv4RfInrL0
— Mike Pan (@themikepan) February 6, 2019
I popped over to Facebook to verify that and what...
Where Do You Nest Your Sass Breakpoints?
11.2.2019
I love nesting my @media query breakpoints. It's perhaps the most important feature of Sass to me. Maybe I pick a method and do it like this:
.element {
display: grid;
grid-template-columns: 100px 1fr;
@include breakpoint(baby-bear) {
display: block;
}
}
That's straightforward enough....
JavaScript Glossary: Array .splice() Method
8.2.2019
Basics
The splice array method changes an existing array by removing, adding and/or replacing specified elements from it. The method mutates the array and returns an array of
JavaScript Glossary: Array .reverse() Method
8.2.2019
Basics
This method changes the position of elements within the array. The first element goes to the last position and the last element goes to the first position. The method returns the re
JavaScript Glossary: Array .map() Method
8.2.2019
Basics
The map() method takes a callback method that performs an operation on the elements in the array. It returns a new array containing the resulting values of running the
JavaScript Glossary: Array .forEach() Method
8.2.2019
Basics
The forEach() method takes a function that performs an action on each of the elements in this array.
[1, 2, 3, 4, 5].forEach(functio
JavaScript Glossary: Array .toString() Method
8.2.2019
Basics
This method returns a String representation of the elements withing the calling array. This method is somewhat similar to the join() method. It returns a s
JavaScript Glossary: Array.some()
8.2.2019
Basics
This method checks if any of the elements contained in an array passes a set test. If at least one of the elements passes this test, true is returned. This method only
Revisiting the abbr element
7.2.2019
An irresistible HTML element deep dive from Ire Aderinokun, this time on the <abbr title=""> element for abbreviations. You can kinda just use it (JUI) and it works fine, but if you're hoping to make a tooltip for them (which works on touchscreens as well), then it's much more complicated....
JavaScript Glossary: Array .every() Method
6.2.2019
Basics
The every method checks that each element in an array passes a set test. This method will return true if all the elements pass the set. Once an element tha
How do you figure?
1.2.2019
Scott O'Hara digs into the <figure> and <figcaption> elements. Gotta love a good ol' HTML deep dive.
I use these on just about every blog post here on CSS-Tricks, and as I've suspected, I've basically been doing it wrong forever. My original thinking was that a figcaption was just...
Custom Cursor Effects
31.1.2019
A collection of five demos and a tutorial on how to create animated custom cursor effects for interactive elements like navigations, galleries and carousels.
Custom Cursor Effects was written by Stefan Kaltenegger and published on Codrops
The Ultimate Guide to JavaScript Algorithms: Counting the Vowels in a String of Text
23.1.2019
In this challenge, we will be working with strings and arrays. Strings and arrays are very much alike in that they are both collections of elements usually of the same type.
In order to mani
2019 CSS Wishlist
17.1.2019
What do you wish CSS could do natively that it can't do now? First, let's review the last time we did this in 2013.
❌ "I'd like to be able to select an element based on if it contains another particular selector"
❌ "I'd like to be able to select an element based on the content...
Algorithmic Layouts
10.1.2019
Don't miss this video by Heydon that digs into CSS layouts. It's great how he combines fundamental knowledge, like the way elements flow, wrap, and can have margin with new layout methods like flexbox and grid (with specific examples). Of particular note is the clear demonstration of how flexbox...
The Elements of UI Engineering
4.1.2019
I really enjoyed this post by Dan Abramov. He defines his work as a UI engineer and I especially like what he writes about his learning experience:
My biggest learning breakthroughs weren’t about a particular technology. Rather, I learned the most when I struggled to solve a particular UI problem....
People Talkin’ Shapes
22.12.2018
Codrops has a very nice article on CSS Shapes from Tania Rascia. You might know shape-outside is for redefining the area by which text is floated around that element, allowing for some interesting design opportunities. But there are a couple of genuine CSS tricks in here:
Float shape-outside...
Regarding CSS’s Global Scope
20.12.2018
html {
font-family: Roboto, sans-serif;
}
With the except of some form elements, you've just set a font on every bit of text on a site! Nice! That's probably what you were trying to do, because of the probably hundreds of elements all over your site, setting that font-family every time would...
JavaScript waitForever
10.12.2018
Writing mochitests for new features in DevTools can be difficult and time-consuming. There are so many elements interacting in an async manner that I oftentimes find myself using the debugger to debug the debugger! In the case where it’s unclear what interaction isn’t working...
An Introduction and Guide to the CSS Object Model (CSSOM)
10.12.2018
If you've been writing JavaScript for some time now, it's almost certain you've written some scripts dealing with the Document Object Model (DOM). DOM scripting takes advantage of the fact that a web page opens up a set of APIs (or interfaces) so you can manipulate and otherwise deal with elements...