From cd7f0d7cfade9ad13ac77d1e78be3aa2410e51f7 Mon Sep 17 00:00:00 2001 From: Cameron Huntington Date: Mon, 28 Nov 2022 15:08:49 -0600 Subject: [PATCH 1/2] alphabetize several theme properties --- stubs/defaultConfig.stub.js | 140 ++++++++++++++++++------------------ 1 file changed, 70 insertions(+), 70 deletions(-) diff --git a/stubs/defaultConfig.stub.js b/stubs/defaultConfig.stub.js index 8a29e2d430a1..f78d5ea31e47 100644 --- a/stubs/defaultConfig.stub.js +++ b/stubs/defaultConfig.stub.js @@ -11,7 +11,6 @@ module.exports = { xl: '1280px', '2xl': '1536px', }, - supports: {}, colors: ({ colors }) => ({ inherit: colors.inherit, current: colors.current, @@ -41,34 +40,6 @@ module.exports = { pink: colors.pink, rose: colors.rose, }), - columns: { - auto: 'auto', - 1: '1', - 2: '2', - 3: '3', - 4: '4', - 5: '5', - 6: '6', - 7: '7', - 8: '8', - 9: '9', - 10: '10', - 11: '11', - 12: '12', - '3xs': '16rem', - '2xs': '18rem', - xs: '20rem', - sm: '24rem', - md: '28rem', - lg: '32rem', - xl: '36rem', - '2xl': '42rem', - '3xl': '48rem', - '4xl': '56rem', - '5xl': '64rem', - '6xl': '72rem', - '7xl': '80rem', - }, spacing: { px: '1px', 0: '0px', @@ -106,6 +77,10 @@ module.exports = { 80: '20rem', 96: '24rem', }, + accentColor: ({ theme }) => ({ + ...theme('colors'), + auto: 'auto', + }), animation: { none: 'none', spin: 'spin 1s linear infinite', @@ -177,19 +152,6 @@ module.exports = { '2xl': '40px', '3xl': '64px', }, - brightness: { - 0: '0', - 50: '.5', - 75: '.75', - 90: '.9', - 95: '.95', - 100: '1', - 105: '1.05', - 110: '1.1', - 125: '1.25', - 150: '1.5', - 200: '2', - }, borderColor: ({ theme }) => ({ ...theme('colors'), DEFAULT: theme('colors.gray.200', 'currentColor'), @@ -227,24 +189,61 @@ module.exports = { none: 'none', }, boxShadowColor: ({ theme }) => theme('colors'), - caretColor: ({ theme }) => theme('colors'), - accentColor: ({ theme }) => ({ - ...theme('colors'), - auto: 'auto', - }), - contrast: { + brightness: { 0: '0', 50: '.5', 75: '.75', + 90: '.9', + 95: '.95', 100: '1', + 105: '1.05', + 110: '1.1', 125: '1.25', 150: '1.5', 200: '2', }, + caretColor: ({ theme }) => theme('colors'), + columns: { + auto: 'auto', + 1: '1', + 2: '2', + 3: '3', + 4: '4', + 5: '5', + 6: '6', + 7: '7', + 8: '8', + 9: '9', + 10: '10', + 11: '11', + 12: '12', + '3xs': '16rem', + '2xs': '18rem', + xs: '20rem', + sm: '24rem', + md: '28rem', + lg: '32rem', + xl: '36rem', + '2xl': '42rem', + '3xl': '48rem', + '4xl': '56rem', + '5xl': '64rem', + '6xl': '72rem', + '7xl': '80rem', + }, container: {}, content: { none: 'none', }, + contrast: { + 0: '0', + 50: '.5', + 75: '.75', + 100: '1', + 125: '1.25', + 150: '1.5', + 200: '2', + }, cursor: { auto: 'auto', default: 'default', @@ -299,22 +298,6 @@ module.exports = { none: 'none', ...theme('colors'), }), - grayscale: { - 0: '0', - DEFAULT: '100%', - }, - hueRotate: { - 0: '0deg', - 15: '15deg', - 30: '30deg', - 60: '60deg', - 90: '90deg', - 180: '180deg', - }, - invert: { - 0: '0', - DEFAULT: '100%', - }, flex: { 1: '1 1 0%', auto: '1 1 auto', @@ -417,6 +400,10 @@ module.exports = { }, gap: ({ theme }) => theme('spacing'), gradientColorStops: ({ theme }) => theme('colors'), + grayscale: { + 0: '0', + DEFAULT: '100%', + }, gridAutoColumns: { auto: 'auto', min: 'min-content', @@ -487,7 +474,7 @@ module.exports = { 'span-6': 'span 6 / span 6', 'span-full': '1 / -1', }, - gridRowStart: { + gridRowEnd: { auto: 'auto', 1: '1', 2: '2', @@ -497,7 +484,7 @@ module.exports = { 6: '6', 7: '7', }, - gridRowEnd: { + gridRowStart: { auto: 'auto', 1: '1', 2: '2', @@ -555,6 +542,14 @@ module.exports = { max: 'max-content', fit: 'fit-content', }), + hueRotate: { + 0: '0deg', + 15: '15deg', + 30: '30deg', + 60: '60deg', + 90: '90deg', + 180: '180deg', + }, inset: ({ theme }) => ({ auto: 'auto', ...theme('spacing'), @@ -566,6 +561,10 @@ module.exports = { '3/4': '75%', full: '100%', }), + invert: { + 0: '0', + DEFAULT: '100%', + }, keyframes: { spin: { to: { @@ -816,6 +815,7 @@ module.exports = { 1: '1', 2: '2', }, + supports: {}, textColor: ({ theme }) => theme('colors'), textDecorationColor: ({ theme }) => theme('colors'), textDecorationThickness: { @@ -827,6 +827,10 @@ module.exports = { 4: '4px', 8: '8px', }, + textIndent: ({ theme }) => ({ + ...theme('spacing'), + }), + textOpacity: ({ theme }) => theme('opacity'), textUnderlineOffset: { auto: 'auto', 0: '0px', @@ -835,10 +839,6 @@ module.exports = { 4: '4px', 8: '8px', }, - textIndent: ({ theme }) => ({ - ...theme('spacing'), - }), - textOpacity: ({ theme }) => theme('opacity'), transformOrigin: { center: 'center', top: 'top', From d0fe5927a32dd804d34831876a7293011b734c9f Mon Sep 17 00:00:00 2001 From: Jonathan Reinink Date: Wed, 30 Nov 2022 18:14:36 -0500 Subject: [PATCH 2/2] Alphabetize all `theme` properties in default config --- stubs/defaultConfig.stub.js | 152 ++++++++++++++++++------------------ 1 file changed, 76 insertions(+), 76 deletions(-) diff --git a/stubs/defaultConfig.stub.js b/stubs/defaultConfig.stub.js index f78d5ea31e47..91c2ab186003 100644 --- a/stubs/defaultConfig.stub.js +++ b/stubs/defaultConfig.stub.js @@ -4,79 +4,6 @@ module.exports = { presets: [], darkMode: 'media', // or 'class' theme: { - screens: { - sm: '640px', - md: '768px', - lg: '1024px', - xl: '1280px', - '2xl': '1536px', - }, - colors: ({ colors }) => ({ - inherit: colors.inherit, - current: colors.current, - transparent: colors.transparent, - black: colors.black, - white: colors.white, - slate: colors.slate, - gray: colors.gray, - zinc: colors.zinc, - neutral: colors.neutral, - stone: colors.stone, - red: colors.red, - orange: colors.orange, - amber: colors.amber, - yellow: colors.yellow, - lime: colors.lime, - green: colors.green, - emerald: colors.emerald, - teal: colors.teal, - cyan: colors.cyan, - sky: colors.sky, - blue: colors.blue, - indigo: colors.indigo, - violet: colors.violet, - purple: colors.purple, - fuchsia: colors.fuchsia, - pink: colors.pink, - rose: colors.rose, - }), - spacing: { - px: '1px', - 0: '0px', - 0.5: '0.125rem', - 1: '0.25rem', - 1.5: '0.375rem', - 2: '0.5rem', - 2.5: '0.625rem', - 3: '0.75rem', - 3.5: '0.875rem', - 4: '1rem', - 5: '1.25rem', - 6: '1.5rem', - 7: '1.75rem', - 8: '2rem', - 9: '2.25rem', - 10: '2.5rem', - 11: '2.75rem', - 12: '3rem', - 14: '3.5rem', - 16: '4rem', - 20: '5rem', - 24: '6rem', - 28: '7rem', - 32: '8rem', - 36: '9rem', - 40: '10rem', - 44: '11rem', - 48: '12rem', - 52: '13rem', - 56: '14rem', - 60: '15rem', - 64: '16rem', - 72: '18rem', - 80: '20rem', - 96: '24rem', - }, accentColor: ({ theme }) => ({ ...theme('colors'), auto: 'auto', @@ -203,6 +130,35 @@ module.exports = { 200: '2', }, caretColor: ({ theme }) => theme('colors'), + colors: ({ colors }) => ({ + inherit: colors.inherit, + current: colors.current, + transparent: colors.transparent, + black: colors.black, + white: colors.white, + slate: colors.slate, + gray: colors.gray, + zinc: colors.zinc, + neutral: colors.neutral, + stone: colors.stone, + red: colors.red, + orange: colors.orange, + amber: colors.amber, + yellow: colors.yellow, + lime: colors.lime, + green: colors.green, + emerald: colors.emerald, + teal: colors.teal, + cyan: colors.cyan, + sky: colors.sky, + blue: colors.blue, + indigo: colors.indigo, + violet: colors.violet, + purple: colors.purple, + fuchsia: colors.fuchsia, + pink: colors.pink, + rose: colors.rose, + }), columns: { auto: 'auto', 1: '1', @@ -715,9 +671,6 @@ module.exports = { 11: '11', 12: '12', }, - padding: ({ theme }) => theme('spacing'), - placeholderColor: ({ theme }) => theme('colors'), - placeholderOpacity: ({ theme }) => theme('opacity'), outlineColor: ({ theme }) => theme('colors'), outlineOffset: { 0: '0px', @@ -733,6 +686,9 @@ module.exports = { 4: '4px', 8: '8px', }, + padding: ({ theme }) => theme('spacing'), + placeholderColor: ({ theme }) => theme('colors'), + placeholderOpacity: ({ theme }) => theme('opacity'), ringColor: ({ theme }) => ({ DEFAULT: theme('colors.blue.500', '#3b82f6'), ...theme('colors'), @@ -787,6 +743,13 @@ module.exports = { 125: '1.25', 150: '1.5', }, + screens: { + sm: '640px', + md: '768px', + lg: '1024px', + xl: '1280px', + '2xl': '1536px', + }, scrollMargin: ({ theme }) => ({ ...theme('spacing'), }), @@ -806,6 +769,43 @@ module.exports = { space: ({ theme }) => ({ ...theme('spacing'), }), + spacing: { + px: '1px', + 0: '0px', + 0.5: '0.125rem', + 1: '0.25rem', + 1.5: '0.375rem', + 2: '0.5rem', + 2.5: '0.625rem', + 3: '0.75rem', + 3.5: '0.875rem', + 4: '1rem', + 5: '1.25rem', + 6: '1.5rem', + 7: '1.75rem', + 8: '2rem', + 9: '2.25rem', + 10: '2.5rem', + 11: '2.75rem', + 12: '3rem', + 14: '3.5rem', + 16: '4rem', + 20: '5rem', + 24: '6rem', + 28: '7rem', + 32: '8rem', + 36: '9rem', + 40: '10rem', + 44: '11rem', + 48: '12rem', + 52: '13rem', + 56: '14rem', + 60: '15rem', + 64: '16rem', + 72: '18rem', + 80: '20rem', + 96: '24rem', + }, stroke: ({ theme }) => ({ none: 'none', ...theme('colors'),