← home
snippets_&_hacks
These are findings from my snippets and hacks.
Laws of UX in CSS →
css_hacks
Law of UX · Aesthetic-Usability Effect
@property
:has()
scroll()
:user-invalid

@property
Animate the Unanimatable
Use @property for smooth custom property animation.
Law of UX · Law of Proximity & Common Region
:has()
The Parent Selector That Does Everything
Style ancestors from child state with pure CSS.

scroll()
Scroll-Driven Animations
Drive keyframes directly from scroll progression.

:user-invalid
Validation That Waits For You
Apply invalid styles only after user interaction.
laws_of_uxSee all principles →