Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

SCSS Comment and mixin highlighting broken #285

Open
Azragh opened this issue Jun 17, 2021 · 7 comments
Open

SCSS Comment and mixin highlighting broken #285

Azragh opened this issue Jun 17, 2021 · 7 comments

Comments

@Azragh
Copy link

Azragh commented Jun 17, 2021

Description

Somehow the highlighting of comments in SCSS files stopped working with the default dark syntax theme. Since the repo of the syntax package is read-only, I post this issue here (https://github.com/atom/atom-dark-syntax/issues).

Steps to Reproduce

  1. Use Atom Dark Syntax Package
  2. Write some oneline comments
  3. Write / use a mixin

Expected behavior:

Comment slashes should be the same color as the comment, known keywords, units, and mixins should also be highlightet. They just are not / not anymore.

Versions

Atom : 1.57.0

Additional Information

image
image
image
image

@Azragh
Copy link
Author

Azragh commented Jun 17, 2021

May be the same as this one: #282

@Azragh
Copy link
Author

Azragh commented Jun 17, 2021

And the same again: #281

@matteobertoldo
Copy link

matteobertoldo commented Sep 26, 2021

@Azragh this is happened after the merge of this PR @chbk can u help us for fix some issue? there are many, caused by the syntax color error. I also have a PR of my own for months to extend tailwindCSS support but which I cannot open until these visual bugs have been fixed.

@Azragh
Copy link
Author

Azragh commented Sep 27, 2021

@matteobertoldo I would love to, but I don't know if I can help here. My programming knowledge is limited to basic PHP and a bit of Javascript, my speciality is CSS / SCSS. Looking into the modified files, I don't understand much, but if I set the color to "inherit" in the inspector at the following definition, the slashes and @'s look good again.

.syntax--source.syntax--css .syntax--punctuation {
    color: inherit;
}

Then to get the funcion names in the right color again, i have to remove / comment out this one:

/* 
    .syntax--source.syntax--css .syntax--entity.syntax--function {
        color: #C5C8C6;
    } 
*/

After adjustments:

image

Before:

image

» At first glance, it looks like two too specific definitions have been built in here - but I can't say what else they affect.

@chbk
Copy link

chbk commented Sep 27, 2021

Sorry for the disruption, I can help fix this. There are separate issues in both grammar and theme:

  • Comment punctuation: an oversight on my part, can be fixed in the theme.
  • At sign: it was intended for all punctuation in all languages to be the same color, besides for comments and literals. I think this should be fixed in the grammar, the question is whether @ is really punctuation or just part of the keyword.
  • Units: they are highlighted correctly when there is a number before. Should be fixed in the grammar. Right now units get different scopes depending on whether there is a number or not.
  • Functions: in CSS, invalid functions are grayed-out and support functions are highlighted in gold. A rule for Less and Sass can be added to the theme for user-defined functions.

@branman180
Copy link

chbk:theme-scopes

1 similar comment
@branman180
Copy link

chbk:theme-scopes

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

No branches or pull requests

4 participants