borela / naomi

Sublime Text enhanced syntax highlighting for JavaScript ES6/ES7/ES2015/ES2016/ES2017+, Babel, FlowType, React JSX, Styled Components, HTML5, SCSS3, PHP 7, phpDoc, PHPUnit, MQL4. Basic: Git config files.
Other
558 stars 18 forks source link

[Styled Components] Variables in code comments should be greyed out #139

Open davidcalhoun opened 6 years ago

davidcalhoun commented 6 years ago

Description

Variables in code comments should also be grey (the color of all commented code). Right now they're white.

screen shot 2018-05-25 at 11 54 25 am

Code sample

const Foo = styled.div`
    & > div {
        /* color: ${ colors.white }; */
    }
`;
ViggoV commented 5 years ago

Possibly related. Single line comments are greyed out in the first level, but not for nested rules.

skaermbillede 2019-01-24 kl 14 35 25

davidcalhoun commented 5 years ago

@ViggoV Unfortunately CSS doesn't allow for that single-line style syntax - see https://developer.mozilla.org/en-US/docs/Web/CSS/Comments

ViggoV commented 5 years ago

I am well aware of that, but styled-components does. It is not well documented, but see this comment and the rest of the conversation.