SublimeText / Sass

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

Vue SFC CSS pseudo classes #110

Open niksy opened 1 month ago

niksy commented 1 month ago

Vue SFC supports :deep and :slotted pseudo classes (as well :global related to SFC), but they’re treated differently than other pseudo classes which accept CSS selectors.

Since there is support for CSS Modules features such as :global and :local, would you be willing to accept PR which will add support for these custom features inside Vue SFC scope?

deathaxe commented 1 month ago

This request is not specific to Sass, but also affects CSS and SCSS both of which do not currently support :global() or :local(). It would require merging https://github.com/sublimehq/Packages/pull/3944 to resolve it for CSS and SCSS.

We could add :deep and :slotted to Sass (and even SCSS), but this would still cause them be missing in CSS.

Ideally the vue.js package would extend CSS/Sass/SCSS to add support for framework specific keywords. It may however cause trouble in case required base packages are not installed.

Adding framework specific features to general purpose syntaxes such as CSS/SCSS/Sass is tricky in the long term - as there are many of them with possible conflicting requirements.

niksy commented 1 month ago

Ah yes, you’re right, I remembered that this should probably be in core CSS package but forgot to update comment 😄

Ideally the vue.js package would extend CSS/Sass/SCSS to add support for framework specific keywords. It may however cause trouble in case required base packages are not installed.

I think this would be best approach, but I don’t know where to start. Vue syntax extends HTML syntax so I don’t know where to hook with changes related only to style blocks.