initial replacements
This commit is contained in:
parent
1473ec2749
commit
6dbd28cbb3
3 changed files with 37 additions and 21 deletions
|
|
@ -1,11 +1,6 @@
|
|||
import transformThemeValue from '../util/transformThemeValue'
|
||||
|
||||
let transformValue = transformThemeValue('boxShadow')
|
||||
let shadowReset = {
|
||||
'*, ::before, ::after': {
|
||||
'--tw-shadow': '0 0 #0000',
|
||||
},
|
||||
}
|
||||
let defaultBoxShadow = [
|
||||
`var(--tw-ring-offset-shadow, 0 0 #0000)`,
|
||||
`var(--tw-ring-shadow, 0 0 #0000)`,
|
||||
|
|
@ -15,9 +10,20 @@ let defaultBoxShadow = [
|
|||
export default function () {
|
||||
return function ({ config, matchUtilities, addBase, addUtilities, theme, variants }) {
|
||||
if (config('mode') === 'jit') {
|
||||
addBase(shadowReset)
|
||||
addBase({
|
||||
'*::tailwind': {
|
||||
'--tw-shadow': '0 0 #0000',
|
||||
},
|
||||
})
|
||||
} else {
|
||||
addUtilities(shadowReset, { respectImportant: false })
|
||||
addUtilities(
|
||||
{
|
||||
'*, ::before, ::after': {
|
||||
'--tw-shadow': '0 0 #0000',
|
||||
},
|
||||
},
|
||||
{ respectImportant: false }
|
||||
)
|
||||
}
|
||||
|
||||
matchUtilities(
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ export default function () {
|
|||
return function ({ config, addBase, addUtilities, variants }) {
|
||||
if (config('mode') === 'jit') {
|
||||
addBase({
|
||||
'*, ::before, ::after': {
|
||||
'*::tailwind': {
|
||||
'--tw-blur': 'var(--tw-empty,/*!*/ /*!*/)',
|
||||
'--tw-brightness': 'var(--tw-empty,/*!*/ /*!*/)',
|
||||
'--tw-contrast': 'var(--tw-empty,/*!*/ /*!*/)',
|
||||
|
|
|
|||
|
|
@ -9,21 +9,31 @@ export default function () {
|
|||
`rgba(147, 197, 253, ${ringOpacityDefault})`
|
||||
)
|
||||
|
||||
let ringReset = {
|
||||
'*, ::before, ::after': {
|
||||
'--tw-ring-inset': 'var(--tw-empty,/*!*/ /*!*/)',
|
||||
'--tw-ring-offset-width': theme('ringOffsetWidth.DEFAULT', '0px'),
|
||||
'--tw-ring-offset-color': theme('ringOffsetColor.DEFAULT', '#fff'),
|
||||
'--tw-ring-color': ringColorDefault,
|
||||
'--tw-ring-offset-shadow': '0 0 #0000',
|
||||
'--tw-ring-shadow': '0 0 #0000',
|
||||
},
|
||||
}
|
||||
|
||||
if (config('mode') === 'jit') {
|
||||
addBase(ringReset)
|
||||
addBase({
|
||||
'*::tailwind': {
|
||||
'--tw-ring-inset': 'var(--tw-empty,/*!*/ /*!*/)',
|
||||
'--tw-ring-offset-width': theme('ringOffsetWidth.DEFAULT', '0px'),
|
||||
'--tw-ring-offset-color': theme('ringOffsetColor.DEFAULT', '#fff'),
|
||||
'--tw-ring-color': ringColorDefault,
|
||||
'--tw-ring-offset-shadow': '0 0 #0000',
|
||||
'--tw-ring-shadow': '0 0 #0000',
|
||||
},
|
||||
})
|
||||
} else {
|
||||
addUtilities(ringReset, { respectImportant: false })
|
||||
addUtilities(
|
||||
{
|
||||
'*, ::before, ::after': {
|
||||
'--tw-ring-inset': 'var(--tw-empty,/*!*/ /*!*/)',
|
||||
'--tw-ring-offset-width': theme('ringOffsetWidth.DEFAULT', '0px'),
|
||||
'--tw-ring-offset-color': theme('ringOffsetColor.DEFAULT', '#fff'),
|
||||
'--tw-ring-color': ringColorDefault,
|
||||
'--tw-ring-offset-shadow': '0 0 #0000',
|
||||
'--tw-ring-shadow': '0 0 #0000',
|
||||
},
|
||||
},
|
||||
{ respectImportant: false }
|
||||
)
|
||||
}
|
||||
|
||||
matchUtilities(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue