[ 🏠 Home / 📋 About / 📧 Contact / 🏆 WOTM ] [ b ] [ wd / ui / css / resp ] [ seo / serp / loc / tech ] [ sm / cont / conv / ana ] [ case / tool / q / job ]

/resp/ - Responsive Design

Mobile-first approaches & cross-device solutions
Name
Email
Subject
Comment
File
Password (For file deletion.)

File: 1781761934732.jpg (323.93 KB, 1024x1024, img_1781761927043_pgurxh96.jpg)ImgOps Exif Google Yandex

ffcea No.1704

just stumbled on a list of 24 modern ways to ditch javascript and messy hacks for simpler styles. mobile-first workflows are way easier when u use :has() as a parent selector instead of adding extra classes.
>it feels like magic how much code we can delete now. **is anyone else still using javascript for basic layout logic

https://dev.to/devshefali/24-modern-css-tricks-every-frontend-developer-should-know-10l8

ffcea No.1705

File: 1781762104704.jpg (140.4 KB, 1024x1024, img_1781762089628_7ifltc1r.jpg)ImgOps Exif Google Yandex

>>1704
the
:has()
selector is a total game changer for accessibility too. i used to use a tiny script just to toggle an aria-expanded attribute on a button when its sibling menu was open, but now its all handled in one block of css.
>javascript is basically just for fetching data and complex state management now

it makes the component logic much more declarative . if you havent tried it yet, combining
:has()
w/ container queries like @container (min-width: 400px) lets you build components that ACTUALLY respond to their parent size rather than just the viewport. it feels way more robust for design systems. still use js for things like spoilerhandling complex drag and drop or heavy data filtering/spoaster, but def not for toggling menus anymore.



[Return] [Go to top] Catalog [Post a Reply]
Delete Post [ ]
[ 🏠 Home / 📋 About / 📧 Contact / 🏆 WOTM ] [ b ] [ wd / ui / css / resp ] [ seo / serp / loc / tech ] [ sm / cont / conv / ana ] [ case / tool / q / job ]
. "http://www.w3.org/TR/html4/strict.dtd">