Log in
Log into community
Join the Webstudio community
New post
View all posts
Related posts
Was this helpful?
😞
😐
😃
Powered by
Hall
Inactive
Updated 2 years ago
0
Follow
olegisonen 2521 hi i am looking into
olegisonen 2521 hi i am looking into
Inactive
0
Follow
At a glance
В
Виталий
2 years ago
·
@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
Share
Open in Discord
O
Oleg Isonen
2 years ago
:where allows having a selector that doesn't increase specificity
O
Oleg Isonen
2 years ago
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
В
Виталий
2 years ago
thanks, actually, i mean selectors #2uUBLu70OniQQeuPXa6g7 h1.Heading
O
Oleg Isonen
2 years ago
We don't use id to leave it for the user-space
O
Oleg Isonen
2 years ago
Our id is generated, ensures conflict free resolution
В
Виталий
2 years ago
ok, i see, thank you!
Add a reply
Sign up and join the conversation on Discord
Join on Discord