Skip to content

Commit

Permalink
use text-decoration-line instead of text-decoration (#6378)
Browse files Browse the repository at this point in the history
* use text-decoration-line instead of text-decoration

* fix tests

Co-authored-by: Oliver Williams <oliver@Olivers-MacBook-Pro.local>
  • Loading branch information
o-t-w and Oliver Williams authored Dec 13, 2021
1 parent 27c2c72 commit 95dd82b
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions src/corePlugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -1660,10 +1660,10 @@ export let corePlugins = {

textDecoration: ({ addUtilities }) => {
addUtilities({
'.underline': { 'text-decoration': 'underline' },
'.overline': { 'text-decoration': 'overline' },
'.line-through': { 'text-decoration': 'line-through' },
'.no-underline': { 'text-decoration': 'none' },
'.underline': { 'text-decoration-line': 'underline' },
'.overline': { 'text-decoration-line': 'overline' },
'.line-through': { 'text-decoration-line': 'line-through' },
'.no-underline': { 'text-decoration-line': 'none' },
})
},

Expand Down
6 changes: 3 additions & 3 deletions tests/apply.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ test('@apply classes from outside a @layer', async () => {
}
.baz {
text-decoration: underline;
text-decoration-line: underline;
--tw-text-opacity: 1;
color: rgb(239 68 68 / var(--tw-text-opacity));
font-weight: 700;
Expand Down Expand Up @@ -351,7 +351,7 @@ test('@applying classes from outside a @layer respects the source order', async
await run(input, config).then((result) => {
return expect(result.css).toMatchFormattedCss(css`
.baz {
text-decoration: none;
text-decoration-line: none;
}
.container {
Expand Down Expand Up @@ -396,7 +396,7 @@ test('@applying classes from outside a @layer respects the source order', async
}
.bar {
text-decoration: none;
text-decoration-line: none;
}
`)
})
Expand Down
2 changes: 1 addition & 1 deletion tests/basic-usage.test.css
Original file line number Diff line number Diff line change
Expand Up @@ -805,7 +805,7 @@
--tw-text-opacity: 0.1;
}
.underline {
text-decoration: underline;
text-decoration-line: underline;
}
.decoration-red-600 {
text-decoration-color: #dc2626;
Expand Down
2 changes: 1 addition & 1 deletion tests/raw-content.test.css
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@
--tw-text-opacity: 0.1;
}
.underline {
text-decoration: underline;
text-decoration-line: underline;
}
.antialiased {
-webkit-font-smoothing: antialiased;
Expand Down
2 changes: 1 addition & 1 deletion tests/safelist.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ it('should safelist strings', () => {
}
.hover\:underline:hover {
text-decoration: underline;
text-decoration-line: underline;
}
`)
})
Expand Down
2 changes: 1 addition & 1 deletion tests/variants.test.css
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@
background-color: rgb(253 224 71 / var(--tw-bg-opacity));
}
.first-line\:underline::first-line {
text-decoration: underline;
text-decoration-line: underline;
}
.marker\:text-lg *::marker {
font-size: 1.125rem;
Expand Down
2 changes: 1 addition & 1 deletion tests/variants.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ describe('custom advanced variants', () => {
}
.my-variant\:underline:where(.one, .two, .three) {
text-decoration: underline;
text-decoration-line: underline;
}
`)
})
Expand Down

0 comments on commit 95dd82b

Please sign in to comment.