Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

With :is and :where it is trivial to trick selectors

:is(selector_1, :where(selector_2))

Has always the specificity of selector_2, and if you choose an impossible selector for selector_1 (the easiest approach is to give multiple ids or use non existent classes/elements) it only select by selector_2



That looks far more complex than just using specificity properly as intended.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: