Skip to content

special selectors #152

Answered by Machy8
ph4un00b asked this question in Q&A
Nov 16, 2022 · 2 comments · 1 reply
Discussion options

You must be logged in to vote

Hi @ph4un00b,

Thanks a lot! I am very glad that you like the idea! ❤️

I have made an example on codepen - https://codepen.io/Machy8/pen/wvXrxze

A bit of explanation

  • The selectors you see [li:nth-of-type(even)]{color:blue} has this structure [<cssSelectors>]{<stylifySelectors>}
    • <cssSelectors>: Are the same like in CSS. Except without space use _ and for a quote ^. You can use more like in CSS using ,.
    • <stylifySelectors>: Normal Stylify selectors. You can add more using ; that splits the content within the {}
  • The & characters always refers to upper level, like in SCSS
    • Selector: [div]{font-size:24px} => CSS: [div]{font-size:24px} div {font-size:24px}
    • Selector: [div_&]{font-size:24px} =>…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@ph4un00b
Comment options

Answer selected by ph4un00b
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants