There is a content property in CSS that’s made to use in tandem with the ::before and ::after pseudo elements. It injects content into the element.
CSS is capable of making all sorts of shapes. Squares and rectangles are easy, as they are the natural shapes of the web. Add a width and height and you have the exact size rectangle you need. Add border-radius and you can round that shape, and enough of it you can turn those rectangles into circles and ovals.
But media elements like don’t have children. The tag isn’t self-closing, but when it is supported (almost always), the content of it is replaced with a shadow DOM you don’t control. Besides, these are the only two elements that “size to an … Read article “Aspect Ratio Media Elements and intrinsicsize”
Sticky elements are predominantly used for keeping something shown on the screen throughout scrolling. As cool as that is, we can also hide elements in the same way!… Read article “Creating sliding effects using sticky positioning”
Struggling to engage your customers with seamless omnichannel digital experiences?
In a recent post, Zach Saucier demonstrated the awesome things that the DOM allows us to do, thanks to the element. Taking a snapshot of an element and manipulating it to create an exploding animation is pretty slick and a perfect example of how far complex animations have come in the last few years.
“Add us to your list!” we asked Chris. “No, your stuff is interesting, can’t you write about you… Read article “Five interesting ways to use Sanity.io for image art direction”
One topic like this (which is … Read article “The peculiar magic of flexbox and auto margins”
The term renderless components refers to components that don’t render anything. … Read article “Building “Renderless” Vue Components”
Let’s use React, styled-components, and react-flip-toolkit to make our own version of the animated navigation menu on the Stripe homepage. It’s an impressive menu with some slick animation effects and the combination of these three tools can make it relatively easy to recreate.… Read article “Building a Complex UI Animation in React, Simply”