You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 30, 2024. It is now read-only.
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:
importstyled,{css}from'styled-components';exportinterfaceTextProps{children: React.ReactNode;as?: 'p'|'span';dark?: boolean;}exportconstStyledText=styled.p<TextProps>` line-height: 1.7; &:last-of-type { margin-bottom: 0; }${({ dark })=>dark&&css` color: black; `}`;exportfunctionText({ children, as ='p', dark =false}: TextProps){return(<div><StyledTextas={as}dark={dark}>{children}<span>Test</span></StyledText></div>);}
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:
OS: macOS Ventura 13.3.1
VSCode Version: 1.77.3
Extension Version: 5.3.10
Typescript Version: 5.0.4
The text was updated successfully, but these errors were encountered:
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:
The text was updated successfully, but these errors were encountered: