Skip to content

Add drop-shadow-* color support #17434

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 6 commits into from
Apr 1, 2025
Merged
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
Prev Previous commit
Next Next commit
Add UI tests
  • Loading branch information
thecrypticace committed Mar 28, 2025
commit a4e7f1839759bfcc09d998e482bf25a620fd8e6d
37 changes: 37 additions & 0 deletions packages/tailwindcss/tests/ui.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1826,6 +1826,43 @@ test('filter', async ({ page }) => {
expect(await getPropertyValue('#b', 'filter')).toEqual('contrast(1)')
})

test('drop shadow colors', async ({ page }) => {
let { getPropertyList } = await render(
page,
html`
<div id="a" class="drop-shadow-md"></div>
<div id="b" class="drop-shadow-md drop-shadow-red"></div>
<div id="c" class="drop-shadow-md/50"></div>
<div id="d" class="drop-shadow-md/50 drop-shadow-red"></div>
<div id="e" class="drop-shadow-md/50 drop-shadow-red/50"></div>
`,
)

expect(await getPropertyList('#a', 'filter')).toEqual([
'drop-shadow(rgba(0, 0, 0, 0.12) 0px 3px 3px)',
])

expect(await getPropertyList('#b', 'filter')).toEqual([
expect.stringMatching(/drop-shadow\(oklab\(0\.627\d+ 0\.224\d+ 0\.125\d+\) 0px 3px 3px\)/),
])

expect(await getPropertyList('#c', 'filter')).toEqual([
'drop-shadow(oklab(0 0 0 / 0.5) 0px 3px 3px)',
])

expect(await getPropertyList('#d', 'filter')).toEqual([
expect.stringMatching(
/drop-shadow\(oklab\(0\.627\d+ 0\.224\d+ 0\.125\d+ \/ 0\.5\) 0px 3px 3px\)/,
),
])

expect(await getPropertyList('#e', 'filter')).toEqual([
expect.stringMatching(
/drop-shadow\(oklab\(0\.627\d+ 0\.224\d+ 0\.125\d+ \/ 0\.25\) 0px 3px 3px\)/,
),
])
})

test('outline style is optional', async ({ page }) => {
let { getPropertyValue } = await render(
page,
Expand Down