Hacker News new | ask | show | jobs
by dlisboa 43 days ago
Layers is for organization.

You can always have different files for different things but without @layers you'll bump into specificity issues. You'd also have to arrange your imports correctly or you spend countless hours on "why is this style being applied and not that one?".

It's what makes modular CSS (with cascade) actually possible.

1 comments

Honestly, I really never had specificity issues (apart from some third party CSS adding styling with high specificity)