naomi icon indicating copy to clipboard operation
naomi copied to clipboard

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

Open davidcalhoun opened this issue 7 years ago • 3 comments

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 }; */
    }
`;

davidcalhoun avatar May 25 '18 18:05 davidcalhoun

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

ViggoV avatar Jan 24 '19 13:01 ViggoV

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

davidcalhoun avatar Jan 25 '19 18:01 davidcalhoun

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.

ViggoV avatar Jan 28 '19 10:01 ViggoV