Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vue SFC CSS pseudo classes #110

Open
niksy opened this issue Jul 11, 2024 · 2 comments
Open

Vue SFC CSS pseudo classes #110

niksy opened this issue Jul 11, 2024 · 2 comments

Comments

@niksy
Copy link

niksy commented Jul 11, 2024

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?

@niksy niksy changed the title Vue SFC CSS pseudo classes :deep and :slotted Vue SFC CSS pseudo classes Jul 11, 2024
@deathaxe
Copy link
Member

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 sublimehq/Packages#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
Copy link
Author

niksy commented Jul 11, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants