DEV Community

Jackie Yio Hex πŸ₯
Jackie Yio Hex πŸ₯

Posted on

5 useful yet underused πŸ‘Ύ CSS rules

Image description

Enable smooth, controlled scrolling by "snapping" elements into view on scroll.

Image description

Keeps elements like images responsive while maintaining their aspect ratio.

Image description

Creates a new stacking context, helping with layer control in complex layouts.

Image description

Resets all styles on an element, great for predictable component design.

Image description

Styles multiple selectors without adding specificity, ideal for reusable styles.

Top comments (8)

Collapse
 
sujans profile image
Sujan Sundareswaran

I’ve always wanted to use the :where selector, and this gave me a nice use-case. Thanks!

Collapse
 
pagesword profile image
Jackie Yio Hex πŸ₯

Honestly I used it maybe once or twice in real case scenario. It's very niche

Collapse
 
elpidaguy profile image
Kaustubh Joshi

Good Information. I will try these in my code. Thanks!

Collapse
 
pagesword profile image
Jackie Yio Hex πŸ₯

i will bring more examples soon

Collapse
 
engrsakib profile image
Md Nazmus Sakib

very informative

Collapse
 
pagesword profile image
Jackie Yio Hex πŸ₯

thank you

Collapse
 
jayaramviswanathr profile image
Viswanath R

Thanks for sharing !!

Collapse
 
pagesword profile image
Jackie Yio Hex πŸ₯

part 2 incoming ✨