Handle default keyword for negative prefix syntax. Write tests for negative prefix syntax
This commit is contained in:
parent
fd203a8906
commit
a249bc4433
8 changed files with 204 additions and 9 deletions
|
|
@ -5,9 +5,10 @@ export default function() {
|
|||
return function({ addUtilities, e, theme, variants }) {
|
||||
const utilities = _.fromPairs(
|
||||
_.map(theme('boxShadow'), (value, modifier) => {
|
||||
const className = modifier === 'default' ? 'shadow' : `shadow-${modifier}`
|
||||
const className =
|
||||
modifier === 'default' ? 'shadow' : `${e(prefixNegativeModifiers('shadow', modifier))}`
|
||||
return [
|
||||
`.${e(prefixNegativeModifiers('shadow', modifier))}`,
|
||||
`.${className}`,
|
||||
{
|
||||
'box-shadow': value,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -5,8 +5,12 @@ export default function() {
|
|||
return function({ addUtilities, theme, variants, e }) {
|
||||
const utilities = _.fromPairs(
|
||||
_.map(theme('letterSpacing'), (value, modifier) => {
|
||||
const className =
|
||||
modifier === 'default'
|
||||
? 'tracking'
|
||||
: `${e(prefixNegativeModifiers('tracking', modifier))}`
|
||||
return [
|
||||
`.${e(prefixNegativeModifiers('tracking', modifier))}`,
|
||||
`.${className}`,
|
||||
{
|
||||
'letter-spacing': value,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -5,8 +5,10 @@ export default function() {
|
|||
return function({ addUtilities, e, theme, variants }) {
|
||||
const utilities = _.fromPairs(
|
||||
_.map(theme('zIndex'), (value, modifier) => {
|
||||
const className =
|
||||
modifier === 'default' ? 'z' : `${e(prefixNegativeModifiers('z', modifier))}`
|
||||
return [
|
||||
`.${e(prefixNegativeModifiers('z', modifier))}`,
|
||||
`.${className}`,
|
||||
{
|
||||
'z-index': value,
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue