Join the Webstudio community

Updated 2 years ago

olegisonen 2521 hi i am looking into

At a glance
@Oleg Isonen hi, i am looking into the project and i see component style scoping is based on :where pseudo selector, i am curious why not used IDs and classes which can be shorter and css would be smaller in size?
O
В
6 comments
:where allows having a selector that doesn't increase specificity
for example:

[data-ws-id="2uUBLu70OniQQeuPXa6g7"]
h1:where([data-ws-component=Heading])

these 2 selectors stay on the same level of specificity even though the second one would be more specific otherwise
thanks, actually, i mean selectors #2uUBLu70OniQQeuPXa6g7 h1.Heading
We don't use id to leave it for the user-space
Our id is generated, ensures conflict free resolution
ok, i see, thank you!
Add a reply
Sign up and join the conversation on Discord