Skip to content

Commit d3cb1cc

Browse files
committed
ensure stroke can handle url arbitrary values
1 parent 3e82b72 commit d3cb1cc

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

src/corePlugins.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1418,7 +1418,7 @@ export let stroke = ({ matchUtilities, theme }) => {
14181418
return { stroke: toColorValue(value) }
14191419
},
14201420
},
1421-
{ values: flattenColorPalette(theme('stroke')), type: 'color' }
1421+
{ values: flattenColorPalette(theme('stroke')), type: ['color', 'url'] }
14221422
)
14231423
}
14241424

tests/arbitrary-values.test.css

+6
Original file line numberDiff line numberDiff line change
@@ -580,12 +580,18 @@
580580
.fill-\[var\(--value\)\] {
581581
fill: var(--value);
582582
}
583+
.fill-\[url\(\#icon-gradient\)\] {
584+
fill: url(#icon-gradient);
585+
}
583586
.stroke-\[\#da5b66\] {
584587
stroke: #da5b66;
585588
}
586589
.stroke-\[color\:var\(--value\)\] {
587590
stroke: var(--value);
588591
}
592+
.stroke-\[url\(\#icon-gradient\)\] {
593+
stroke: url(#icon-gradient);
594+
}
589595
.stroke-\[20px\] {
590596
stroke-width: 20px;
591597
}

tests/arbitrary-values.test.html

+2
Original file line numberDiff line numberDiff line change
@@ -207,9 +207,11 @@
207207

208208
<div class="fill-[#da5b66]"></div>
209209
<div class="fill-[var(--value)]"></div>
210+
<div class="fill-[url(#icon-gradient)]"></div>
210211

211212
<div class="stroke-[#da5b66]"></div>
212213
<div class="stroke-[color:var(--value)]"></div>
214+
<div class="stroke-[url(#icon-gradient)]"></div>
213215

214216
<div class="stroke-[20px]"></div>
215217
<div class="stroke-[length:var(--value)]"></div>

0 commit comments

Comments
 (0)