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
2 changes: 1 addition & 1 deletion src/corePlugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -1670,7 +1670,7 @@ export let corePlugins = {
return { 'text-decoration-color': toColorValue(value) }
},
},
{ values: flattenColorPalette(theme('textDecorationColor')), type: ['color', 'any'] }
{ values: flattenColorPalette(theme('textDecorationColor')), type: ['color'] }
)
},

Expand Down
3 changes: 0 additions & 3 deletions tests/arbitrary-values.test.css
Original file line number Diff line number Diff line change
Expand Up @@ -822,9 +822,6 @@
.decoration-\[color\:var\(--color\)\] {
text-decoration-color: var(--color);
}
.decoration-\[var\(--color\)\] {
text-decoration-color: var(--color);
}
.decoration-\[length\:10px\] {
text-decoration-thickness: 10px;
}
Expand Down
1 change: 0 additions & 1 deletion tests/arbitrary-values.test.html
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,6 @@
<div class="decoration-[rgb(123,_123,_123)]"></div>
<div class="decoration-[rgb(123_123_123)]"></div>
<div class="decoration-[color:var(--color)]"></div>
<div class="decoration-[var(--color)]"></div>

<div class="decoration-[length:10px]"></div>

Expand Down
22 changes: 22 additions & 0 deletions tests/arbitrary-values.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,28 @@ test('arbitrary values', () => {
})
})

it('should be possible to differentiate between decoration utilities', () => {
let config = {
content: [
{
raw: html` <div class="decoration-[3px] decoration-[#ccc]"></div> `,
},
],
}

return run('@tailwind utilities', config).then((result) => {
return expect(result.css).toMatchFormattedCss(css`
.decoration-\[\#ccc\] {
text-decoration-color: #ccc;
}

.decoration-\[3px\] {
text-decoration-thickness: 3px;
}
`)
})
})

it('should support modifiers for arbitrary values that contain the separator', () => {
let config = {
content: [
Expand Down