Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -69,20 +69,28 @@ test('@theme', () => {
let input = [
//
'@theme {',
' color: red;',
' --color: red;',
' --font-*: initial;',
' --font-weight-*: initial;',
'}',
'@theme inline reference static default {',
' color: red;',
' --color: red;',
' --font-*: initial;',
' --font-weight-*: initial;',
'}',
]

let output = [
//
'.placeholder {', // wrong
' color: red;',
' --color: red;',
' --font-_: initial;',
' --font-weight-_: initial;',
'}',
'.placeholder {', // wrong
' color: red;',
' --color: red;',
' --font-_: initial;',
' --font-weight-_: initial;',
'}',
]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export function rewriteCss(css: string) {
})

// Replace `--some-var-*` with `--some-var-_`
css = css.replace(/--([a-zA-Z0-9]+)-[*]/g, '--$1_')
css = css.replace(/--([a-zA-Z0-9-]+)-[*]/g, '--$1-_')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hehe

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

right?! lol


return css
}
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ defineTest({
@theme {
--color-primary: #333;
--leading-*: initial;
--font-weight-*: initial;
}
`,
})
Expand All @@ -235,7 +236,7 @@ defineTest({
uri: '{workspace:default}/file-1.css',
range: {
start: { line: 1, character: 0 },
end: { line: 4, character: 1 },
end: { line: 5, character: 1 },
},
},
},
Expand Down
1 change: 1 addition & 0 deletions packages/vscode-tailwindcss/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## Prerelease

- Don't throw when requiring() packages that resolve to a path containing a `#` character ([#1235](https://github.com/tailwindlabs/tailwindcss-intellisense/pull/1235))
- Fix syntax error when resetting multi-word theme key namespaces ([#1237](https://github.com/tailwindlabs/tailwindcss-intellisense/pull/1237))

# 0.14.7

Expand Down