Skip to content

Commit

Permalink
Merge pull request #651 from ben-rogerson/feature/text-decoration-line
Browse files Browse the repository at this point in the history
Use `text-decoration-line` instead of `text-decoration`
  • Loading branch information
ben-rogerson committed Mar 27, 2022
2 parents 0d640f8 + 11c1d8f commit d6a5796
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 11 deletions.
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

0 comments on commit d6a5796

Please sign in to comment.