SublimeText / Sass

Sass and SCSS syntax for Sublime Text
https://packagecontrol.io/packages/Sass
MIT License
51 stars 8 forks source link

Pseudo selectors behave differently #44

Closed sandrojohanides closed 5 years ago

sandrojohanides commented 5 years ago

Are functional pseudo selectors supposed to have a different color? ::slotted() is white. Also, pseudo class content of not:() shouldn’t be blue.

Sources:

.test:not(:first-child) {}
.test:not(.test) {}
.test:dir(rtl) {}
.test:nth-child(n + 1) {}
.test:first-child {}
.test::slotted(span) {}
.test::after {}

screen shot 2018-11-27 at 12 11 12

braver commented 5 years ago

It depends on your color scheme what happens exactly, but :not() is also scoped as a function call, whereas :first-child is not. The arguments are part of the function call, so that's probably also why :first-child is blue when passed to :not(). We match the CSS syntax here, so I expect that to look the same in a CSS file with your color scheme. Right now at least no cause to expect there to be something wrong, so I'm closing it.

sandrojohanides commented 5 years ago

The scheme I’m using doesn’t differentiate between a regular and a functional pseudo class (in CSS3), so seeing a difference was new for me I guess.

screen shot 2018-11-27 at 20 57 38