Repository navigation
Minor Changes
-
#465
004e515Thanks @quantizor! - Modern CSS functions such asoklch(),color-mix(),clamp(), andlight-dark()now highlight as functions inside styled templates, andlight-dark()no longer breaks apart at the hyphen. -
#465
004e515Thanks @quantizor! - CSS highlighting now works in more of the ways you write styled components: a tag chain, on one line or split across lines by Prettier (styled.divorButton.extend, then any number of.attrs()and.withConfig()calls), a comment betweenstyled.divand its backtick, a tag reached through an object (theme.styled.div,$styled.div,theme.css) or through a call or index (getTheme().styled.div,items[0].styled.div), type arguments that span several lines, including ontheme.keyframes, and an arrow function whose parameter starts with$or has no parentheses, likestyled.div(($props) => ...)orstyled.div(p => ...). -
#465
004e515Thanks @quantizor! -hwb(),lab(),lch(),oklab(), andoklch()colors now show a color swatch, and the color picker can write any color in these five formats.
Patch Changes
-
#465
004e515Thanks @quantizor! - Typing a backtick no longer offers to expand it into a multi-line template everywhere. The "expand template string" suggestion now appears only when the backtick opens a styled template (#386). -
#465
004e515Thanks @quantizor! - The color picker now writes the same values VS Code's picker writes in.cssfiles. A semi-transparent hex color always gets a valid two-digit alpha (#ff00000drather than#ff0000c), andhsl()values use whole numbers. -
#465
004e515Thanks @quantizor! - Picking a CSS property from the suggestion list and pressing Enter fills in: ;again when the template holds a nested template string inside${}(#437). It also works when the styled tag is spread across several lines. -
#465
004e515Thanks @quantizor! - Syntax highlighting is about 8% faster on average, measured over about 5,800 lines of styled-components code in JavaScript and TSX, both the first time the editor highlights a file and after. Files with very long single lines gained the most, highlighting about 65% faster on average. -
#465
004e515Thanks @quantizor! - Syntax highlighting no longer breaks for the rest of the file after certain styled components. These now highlight correctly, along with the code below them: a template right after a call whose arrow function returns an object or JSX, likefoo(() => ({ ... }))or MUI'sstyled(({ className, ...props }) => (...))pattern (#383);.attrs()that uses props, even across several lines (#292); a props type written over several lines, likestyled.div<{ color: string }>broken onto new lines (#358); TypeScript type parameters afterstyled.div(#442); a styled component passed into a function such asReact.memo(#196); and templates afterComp.extend,keyframes, and.withComponent(). -
#465
004e515Thanks @quantizor! - Keyframe selectors with decimals, like33.3%, now highlight as one selector inside an@keyframesblock, the same as they already did in akeyframestemplate. -
#465
004e515Thanks @quantizor! - The extension now needs VS Code 1.74 or later, so VS Code starts it for the Enter-key: ;command in any JavaScript or TypeScript file, not only after a JSX or TSX file opens. -
#465
004e515Thanks @quantizor! - Space-separatedrgb()andhsl()colors now show a color swatch and open the color picker, with or without a/ alphavalue, likehsl(220 30% 95%)andrgb(255 0 153 / 50%)(#455).