Skip to content

Commit 95dd82b

Browse files
o-t-wOliver Williams
and
Oliver Williams
authored
use text-decoration-line instead of text-decoration (#6378)
* use text-decoration-line instead of text-decoration * fix tests Co-authored-by: Oliver Williams <[email protected]>
1 parent 27c2c72 commit 95dd82b

7 files changed

+12
-12
lines changed

src/corePlugins.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -1660,10 +1660,10 @@ export let corePlugins = {
16601660

16611661
textDecoration: ({ addUtilities }) => {
16621662
addUtilities({
1663-
'.underline': { 'text-decoration': 'underline' },
1664-
'.overline': { 'text-decoration': 'overline' },
1665-
'.line-through': { 'text-decoration': 'line-through' },
1666-
'.no-underline': { 'text-decoration': 'none' },
1663+
'.underline': { 'text-decoration-line': 'underline' },
1664+
'.overline': { 'text-decoration-line': 'overline' },
1665+
'.line-through': { 'text-decoration-line': 'line-through' },
1666+
'.no-underline': { 'text-decoration-line': 'none' },
16671667
})
16681668
},
16691669

tests/apply.test.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ test('@apply classes from outside a @layer', async () => {
303303
}
304304
305305
.baz {
306-
text-decoration: underline;
306+
text-decoration-line: underline;
307307
--tw-text-opacity: 1;
308308
color: rgb(239 68 68 / var(--tw-text-opacity));
309309
font-weight: 700;
@@ -351,7 +351,7 @@ test('@applying classes from outside a @layer respects the source order', async
351351
await run(input, config).then((result) => {
352352
return expect(result.css).toMatchFormattedCss(css`
353353
.baz {
354-
text-decoration: none;
354+
text-decoration-line: none;
355355
}
356356
357357
.container {
@@ -396,7 +396,7 @@ test('@applying classes from outside a @layer respects the source order', async
396396
}
397397
398398
.bar {
399-
text-decoration: none;
399+
text-decoration-line: none;
400400
}
401401
`)
402402
})

tests/basic-usage.test.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -805,7 +805,7 @@
805805
--tw-text-opacity: 0.1;
806806
}
807807
.underline {
808-
text-decoration: underline;
808+
text-decoration-line: underline;
809809
}
810810
.decoration-red-600 {
811811
text-decoration-color: #dc2626;

tests/raw-content.test.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,7 @@
552552
--tw-text-opacity: 0.1;
553553
}
554554
.underline {
555-
text-decoration: underline;
555+
text-decoration-line: underline;
556556
}
557557
.antialiased {
558558
-webkit-font-smoothing: antialiased;

tests/safelist.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ it('should safelist strings', () => {
4040
}
4141
4242
.hover\:underline:hover {
43-
text-decoration: underline;
43+
text-decoration-line: underline;
4444
}
4545
`)
4646
})

tests/variants.test.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@
123123
background-color: rgb(253 224 71 / var(--tw-bg-opacity));
124124
}
125125
.first-line\:underline::first-line {
126-
text-decoration: underline;
126+
text-decoration-line: underline;
127127
}
128128
.marker\:text-lg *::marker {
129129
font-size: 1.125rem;

tests/variants.test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ describe('custom advanced variants', () => {
200200
}
201201
202202
.my-variant\:underline:where(.one, .two, .three) {
203-
text-decoration: underline;
203+
text-decoration-line: underline;
204204
}
205205
`)
206206
})

0 commit comments

Comments
 (0)