A CSS trick using padding
, object-fit
and object-position
to show / hide img
content.
Topic: CSS
If you're defining absolute width or height for an absolute positioned element, you can use auto margin to lay out these elements.
Style queries for custom properties will eliminate the need for custom media queries.
A snippet to fade out text with
mask-image
.Use
position: sticky
to create a CSS-only scroll-top link.