Skip to content
New issue

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

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

Already on GitHub? # to your account

add testcase for #381 #407

Merged
merged 1 commit into from
Jul 4, 2024
Merged
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
17 changes: 17 additions & 0 deletions src/values/box-shadows.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,23 @@ BoxShadows('finds vendor prefixed values', () => {
assert.equal(actual, expected)
})

BoxShadows.skip('does not report var() fallback values as separate values', () => {
const fixture = `
with-fallback {
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
}`
const actual = analyze(fixture).values.boxShadows
const expected = {
total: 1,
unique: {
'var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)': 1,
},
totalUnique: 1,
uniquenessRatio: 1
}
assert.equal(actual, expected)
})

BoxShadows('ignores keywords', () => {
const fixture = `
box-shadows-keyword {
Expand Down