Please select any editor that you're experiencing this issue in.
Please provide the name/repo of the color scheme package you're using:
(optional) Please include any packages/extensions you're using which could be conflicting:
- Deferring to the VS Code less syntax highlighting from within a Svelte file's
style tag
When using an unknown pseudo class, the highlighting ends up in a broken state, which can influence/mess up how the code after it is highlighted.
Example:
:global(.demo) {
color: blue;
}
Will provide just meta.selector.less as the token for :global, but it should be entity.other.attribute-name.pseudo-class.less like it is for known pseudo classes, like is:(.demo) { }.
This came up in sveltejs/language-tools#2650, the repo for the Svelte extension which defers the syntax highlighting of <style lang="less"> to VS Code's built-in grammar, which to my knowledge is this grammar. :global is not a spec-ed pseudo class, rather a Svelte-specific one.
As far as I can see this is due to https://github.com/radium-v/Better-Less/blob/master/Syntaxes/Better%20Less.YAML-tmLanguage#L1952 only matching on a known list of pseudo classes.
Please select any editor that you're experiencing this issue in.
Please provide the name/repo of the color scheme package you're using:
(optional) Please include any packages/extensions you're using which could be conflicting:
styletagWhen using an unknown pseudo class, the highlighting ends up in a broken state, which can influence/mess up how the code after it is highlighted.
Example:
Will provide just
meta.selector.lessas the token for:global, but it should beentity.other.attribute-name.pseudo-class.lesslike it is for known pseudo classes, likeis:(.demo) { }.This came up in sveltejs/language-tools#2650, the repo for the Svelte extension which defers the syntax highlighting of
<style lang="less">to VS Code's built-in grammar, which to my knowledge is this grammar.:globalis not a spec-ed pseudo class, rather a Svelte-specific one.As far as I can see this is due to https://github.com/radium-v/Better-Less/blob/master/Syntaxes/Better%20Less.YAML-tmLanguage#L1952 only matching on a known list of pseudo classes.