diff --git a/__tests__/containerPlugin.test.js b/__tests__/containerPlugin.test.js index a81239e49..9c85e2fc0 100644 --- a/__tests__/containerPlugin.test.js +++ b/__tests__/containerPlugin.test.js @@ -217,7 +217,7 @@ test('responsive horizontal padding can be included by default', () => { }, container: { padding: { - default: '1rem', + DEFAULT: '1rem', sm: '2rem', lg: '4rem', xl: '5rem', diff --git a/__tests__/flattenColorPalette.test.js b/__tests__/flattenColorPalette.test.js index 98ab5a72b..456488a6d 100644 --- a/__tests__/flattenColorPalette.test.js +++ b/__tests__/flattenColorPalette.test.js @@ -8,7 +8,7 @@ test('it flattens nested color objects', () => { 25: 'rgba(255,255,255,.25)', 50: 'rgba(255,255,255,.5)', 75: 'rgba(255,255,255,.75)', - default: '#fff', + DEFAULT: '#fff', }, red: { 1: 'rgb(33,0,0)', diff --git a/__tests__/plugins/boxShadow.test.js b/__tests__/plugins/boxShadow.test.js index aa43c94d4..706246320 100644 --- a/__tests__/plugins/boxShadow.test.js +++ b/__tests__/plugins/boxShadow.test.js @@ -2,13 +2,13 @@ import _ from 'lodash' import escapeClassName from '../../src/util/escapeClassName' import plugin from '../../src/plugins/boxShadow' -test('box shadow can use default keyword and negative prefix syntax', () => { +test('box shadow can use DEFAULT keyword and negative prefix syntax', () => { const addedUtilities = [] const config = { theme: { boxShadow: { - default: '0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)', + DEFAULT: '0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)', md: '0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)', '-': 'inset 0 2px 4px 0 rgba(0, 0, 0, 0.06)', '-md': '0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)', diff --git a/__tests__/plugins/divideWidth.test.js b/__tests__/plugins/divideWidth.test.js index b55558a69..165c7df61 100644 --- a/__tests__/plugins/divideWidth.test.js +++ b/__tests__/plugins/divideWidth.test.js @@ -5,7 +5,7 @@ test('generating divide width utilities', () => { const config = { theme: { divideWidth: { - default: '1px', + DEFAULT: '1px', '0': '0', '2': '2px', '4': '4px', diff --git a/src/plugins/borderColor.js b/src/plugins/borderColor.js index 40204c8d5..6d94e0816 100644 --- a/src/plugins/borderColor.js +++ b/src/plugins/borderColor.js @@ -20,7 +20,7 @@ export default function() { } const utilities = _.fromPairs( - _.map(_.omit(colors, 'default'), (value, modifier) => { + _.map(_.omit(colors, 'DEFAULT'), (value, modifier) => { return [`.${e(`border-${modifier}`)}`, getProperties(value)] }) ) diff --git a/src/plugins/borderRadius.js b/src/plugins/borderRadius.js index e491d30f6..f01cfc37f 100644 --- a/src/plugins/borderRadius.js +++ b/src/plugins/borderRadius.js @@ -34,7 +34,7 @@ export default function() { const utilities = _.flatMap(generators, generator => { return _.flatMap(theme('borderRadius'), (value, modifier) => { - return generator(value, modifier === 'default' ? '' : `-${modifier}`) + return generator(value, modifier === 'DEFAULT' ? '' : `-${modifier}`) }) }) diff --git a/src/plugins/borderWidth.js b/src/plugins/borderWidth.js index d84fb440e..97e99828f 100644 --- a/src/plugins/borderWidth.js +++ b/src/plugins/borderWidth.js @@ -16,7 +16,7 @@ export default function() { const utilities = _.flatMap(generators, generator => { return _.flatMap(theme('borderWidth'), (value, modifier) => { - return generator(value, modifier === 'default' ? '' : `-${modifier}`) + return generator(value, modifier === 'DEFAULT' ? '' : `-${modifier}`) }) }) diff --git a/src/plugins/boxShadow.js b/src/plugins/boxShadow.js index 000597286..20f400f39 100644 --- a/src/plugins/boxShadow.js +++ b/src/plugins/boxShadow.js @@ -6,7 +6,7 @@ export default function() { const utilities = _.fromPairs( _.map(theme('boxShadow'), (value, modifier) => { const className = - modifier === 'default' ? 'shadow' : `${e(prefixNegativeModifiers('shadow', modifier))}` + modifier === 'DEFAULT' ? 'shadow' : `${e(prefixNegativeModifiers('shadow', modifier))}` return [ `.${className}`, { diff --git a/src/plugins/container.js b/src/plugins/container.js index ff1ff415d..6f6529fd6 100644 --- a/src/plugins/container.js +++ b/src/plugins/container.js @@ -30,7 +30,7 @@ function mapMinWidthsToPadding(minWidths, screens, paddings) { if (!_.isObject(paddings)) { return [ { - screen: 'default', + screen: 'DEFAULT', minWidth: 0, padding: paddings, }, @@ -39,11 +39,11 @@ function mapMinWidthsToPadding(minWidths, screens, paddings) { const mapping = [] - if (paddings.default) { + if (paddings.DEFAULT) { mapping.push({ - screen: 'default', + screen: 'DEFAULT', minWidth: 0, - padding: paddings.default, + padding: paddings.DEFAULT, }) } diff --git a/src/plugins/css/preflight.css b/src/plugins/css/preflight.css index 7f5c35341..511a692b0 100644 --- a/src/plugins/css/preflight.css +++ b/src/plugins/css/preflight.css @@ -99,7 +99,7 @@ html { box-sizing: border-box; /* 1 */ border-width: 0; /* 2 */ border-style: solid; /* 2 */ - border-color: theme('borderColor.default', currentColor); /* 2 */ + border-color: theme('borderColor.DEFAULT', currentColor); /* 2 */ } /* diff --git a/src/plugins/divideColor.js b/src/plugins/divideColor.js index 75df3789a..d728cb8eb 100644 --- a/src/plugins/divideColor.js +++ b/src/plugins/divideColor.js @@ -20,7 +20,7 @@ export default function() { } const utilities = _.fromPairs( - _.map(_.omit(colors, 'default'), (value, modifier) => { + _.map(_.omit(colors, 'DEFAULT'), (value, modifier) => { return [ `.${e(`divide-${modifier}`)} > :not(template) ~ :not(template)`, getProperties(value), diff --git a/src/plugins/divideWidth.js b/src/plugins/divideWidth.js index 44757d8e2..d06afc4dd 100644 --- a/src/plugins/divideWidth.js +++ b/src/plugins/divideWidth.js @@ -24,7 +24,7 @@ export default function() { const utilities = _.flatMap(generators, generator => { return [ ..._.flatMap(theme('divideWidth'), (value, modifier) => { - return generator(value, modifier === 'default' ? '' : `-${modifier}`) + return generator(value, modifier === 'DEFAULT' ? '' : `-${modifier}`) }), { '.divide-y-reverse > :not(template) ~ :not(template)': { diff --git a/src/plugins/flexGrow.js b/src/plugins/flexGrow.js index ae9e04921..6784fd77c 100644 --- a/src/plugins/flexGrow.js +++ b/src/plugins/flexGrow.js @@ -5,7 +5,7 @@ export default function() { addUtilities( _.fromPairs( _.map(theme('flexGrow'), (value, modifier) => { - const className = modifier === 'default' ? 'flex-grow' : `flex-grow-${modifier}` + const className = modifier === 'DEFAULT' ? 'flex-grow' : `flex-grow-${modifier}` return [ `.${e(className)}`, { diff --git a/src/plugins/flexShrink.js b/src/plugins/flexShrink.js index 073836d28..129218aed 100644 --- a/src/plugins/flexShrink.js +++ b/src/plugins/flexShrink.js @@ -5,7 +5,7 @@ export default function() { addUtilities( _.fromPairs( _.map(theme('flexShrink'), (value, modifier) => { - const className = modifier === 'default' ? 'flex-shrink' : `flex-shrink-${modifier}` + const className = modifier === 'DEFAULT' ? 'flex-shrink' : `flex-shrink-${modifier}` return [ `.${e(className)}`, { diff --git a/src/util/createUtilityPlugin.js b/src/util/createUtilityPlugin.js index 8053cc0b2..f1f8cdf21 100644 --- a/src/util/createUtilityPlugin.js +++ b/src/util/createUtilityPlugin.js @@ -4,7 +4,7 @@ import toPairs from 'lodash/toPairs' import castArray from 'lodash/castArray' function className(classPrefix, key) { - if (key === 'default') { + if (key === 'DEFAULT') { return classPrefix } diff --git a/src/util/flattenColorPalette.js b/src/util/flattenColorPalette.js index 5110e988d..f40d09ec4 100644 --- a/src/util/flattenColorPalette.js +++ b/src/util/flattenColorPalette.js @@ -8,7 +8,7 @@ export default function flattenColorPalette(colors) { } return _.map(color, (value, key) => { - const suffix = key === 'default' ? '' : `-${key}` + const suffix = key === 'DEFAULT' ? '' : `-${key}` return [`${name}${suffix}`, value] }) }) diff --git a/stubs/defaultConfig.stub.js b/stubs/defaultConfig.stub.js index 46d40565b..f0f4ac6f0 100644 --- a/stubs/defaultConfig.stub.js +++ b/stubs/defaultConfig.stub.js @@ -182,13 +182,13 @@ module.exports = { }, borderColor: theme => ({ ...theme('colors'), - default: theme('colors.gray.300', 'currentColor'), + DEFAULT: theme('colors.gray.300', 'currentColor'), }), borderOpacity: theme => theme('opacity'), borderRadius: { none: '0', sm: '0.125rem', - default: '0.25rem', + DEFAULT: '0.25rem', md: '0.375rem', lg: '0.5rem', xl: '0.75rem', @@ -197,7 +197,7 @@ module.exports = { full: '9999px', }, borderWidth: { - default: '1px', + DEFAULT: '1px', '0': '0', '2': '2px', '4': '4px', @@ -206,7 +206,7 @@ module.exports = { boxShadow: { xs: '0 0 0 1px rgba(0, 0, 0, 0.05)', sm: '0 1px 2px 0 rgba(0, 0, 0, 0.05)', - default: '0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)', + DEFAULT: '0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)', md: '0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)', lg: '0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)', xl: '0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)', @@ -239,11 +239,11 @@ module.exports = { }, flexGrow: { '0': '0', - default: '1', + DEFAULT: '1', }, flexShrink: { '0': '0', - default: '1', + DEFAULT: '1', }, fontFamily: { sans: [ @@ -638,7 +638,7 @@ module.exports = { transitionProperty: { none: 'none', all: 'all', - default: 'background-color, border-color, color, fill, stroke, opacity, box-shadow, transform', + DEFAULT: 'background-color, border-color, color, fill, stroke, opacity, box-shadow, transform', colors: 'background-color, border-color, color, fill, stroke', opacity: 'opacity', shadow: 'box-shadow',