Add support for negative prefixes in zIndex plugin

This commit is contained in:
Adam Wathan 2019-04-26 08:57:55 -04:00
parent 0735e3d27e
commit 2104a4e006

View file

@ -1,11 +1,12 @@
import _ from 'lodash'
import prefixNegativeModifiers from '../util/prefixNegativeModifiers'
export default function() {
return function({ addUtilities, theme, variants }) {
return function({ addUtilities, e, theme, variants }) {
const utilities = _.fromPairs(
_.map(theme('zIndex'), (value, modifier) => {
return [
`.z-${modifier}`,
`.${e(prefixNegativeModifiers('z', modifier))}`,
{
'z-index': value,
},