Skip to content

Fix syntax error when resetting multi-word theme key namespaces #1237

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Feb 26, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
Add tests
  • Loading branch information
thecrypticace committed Feb 26, 2025
commit 2bd25864844c158d3b55d1f21b18a8fe7f6d0abd
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 @@ -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