Skip to content
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

Use text-decoration-line instead of text-decoration #651

Merged
merged 1 commit into from Mar 27, 2022
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion __fixtures__/utiltiesTypography/textDecoration.js
Expand Up @@ -2,6 +2,6 @@ import tw from './macro'

// https://tailwindcss.com/docs/text-decoration
tw`underline`
// tw`overline`
tw`overline`
tw`line-through`
tw`no-underline`
16 changes: 9 additions & 7 deletions __snapshots__/plugin.test.js.snap
Expand Up @@ -1089,7 +1089,7 @@ const multipleClasses = {
backgroundColor: 'rgb(0 0 0 / var(--tw-bg-opacity))',
'--tw-text-opacity': '1',
color: 'rgb(255 255 255 / var(--tw-text-opacity))',
textDecoration: 'underline',
textDecorationLine: 'underline',
},
}
const pseudoElement = {
Expand Down Expand Up @@ -51867,22 +51867,24 @@ import tw from './macro'

// https://tailwindcss.com/docs/text-decoration
tw\`underline\`
// tw\`overline\`
tw\`overline\`
tw\`line-through\`
tw\`no-underline\`

↓ ↓ ↓ ↓ ↓ ↓

// https://tailwindcss.com/docs/text-decoration
;({
textDecoration: 'underline',
}) // tw\`overline\`

textDecorationLine: 'underline',
})
;({
textDecorationLine: 'overline',
})
;({
textDecoration: 'line-through',
textDecorationLine: 'line-through',
})
;({
textDecoration: 'none',
textDecorationLine: 'none',
})


Expand Down
7 changes: 4 additions & 3 deletions src/config/staticStyles.js
Expand Up @@ -441,9 +441,10 @@ export default {
// See dynamicStyles.js

// https://tailwindcss.com/docs/text-decoration
underline: { output: { textDecoration: 'underline' } },
'line-through': { output: { textDecoration: 'line-through' } },
'no-underline': { output: { textDecoration: 'none' } },
underline: { output: { textDecorationLine: 'underline' } },
overline: { output: { textDecorationLine: 'overline' } },
'line-through': { output: { textDecorationLine: 'line-through' } },
'no-underline': { output: { textDecorationLine: 'none' } },

// https://tailwindcss.com/docs/text-transform
uppercase: { output: { textTransform: 'uppercase' } },
Expand Down