Open andre-lergier opened 1 year ago
Has it been fixed or found work around (except deleting css
before quotes)?
Doing something like this:
${({ dark }) =>
dark &&
css`
color: black;
`}
/* comment fixes highlight below */
Not only for css
but any instance that contains TypeScript props will break all the highlighting.
And this goes all the way to the end of the file.
After the usage of styling within
css
function (ThemedCssFunction
) the syntax highlighting breaks.Here an example with a simple
Text
component for a Typescript Next.js application.Correct Highlighting:
Highlighting after prop based css`` styling:
Here's the code to copy:
If I use an inline syntax, the highlighting still works. In situations where you have multiple css rules to apply based on a prop I prefer using the
css``
block.Environment: