mirror of
https://github.com/tailwindlabs/tailwindcss.git
synced 2025-12-08 21:36:08 +00:00
Fix code style
This commit is contained in:
parent
a4bdae4d63
commit
083ab97e12
@ -18,7 +18,7 @@ test('prefix key overrides default prefix', () => {
|
||||
appearance: ['responsive'],
|
||||
borderCollapse: [],
|
||||
borderColors: ['responsive', 'hover', 'focus'],
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
const result = mergeConfigWithDefaults(userConfig, defaultConfig)
|
||||
@ -36,7 +36,7 @@ test('prefix key overrides default prefix', () => {
|
||||
appearance: ['responsive'],
|
||||
borderCollapse: [],
|
||||
borderColors: ['responsive', 'hover', 'focus'],
|
||||
}
|
||||
},
|
||||
})
|
||||
})
|
||||
|
||||
@ -58,7 +58,7 @@ test('important key overrides default important', () => {
|
||||
appearance: ['responsive'],
|
||||
borderCollapse: [],
|
||||
borderColors: ['responsive', 'hover', 'focus'],
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
const result = mergeConfigWithDefaults(userConfig, defaultConfig)
|
||||
@ -76,7 +76,7 @@ test('important key overrides default important', () => {
|
||||
appearance: ['responsive'],
|
||||
borderCollapse: [],
|
||||
borderColors: ['responsive', 'hover', 'focus'],
|
||||
}
|
||||
},
|
||||
})
|
||||
})
|
||||
|
||||
@ -98,7 +98,7 @@ test('separator key overrides default separator', () => {
|
||||
appearance: ['responsive'],
|
||||
borderCollapse: [],
|
||||
borderColors: ['responsive', 'hover', 'focus'],
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
const result = mergeConfigWithDefaults(userConfig, defaultConfig)
|
||||
@ -116,7 +116,7 @@ test('separator key overrides default separator', () => {
|
||||
appearance: ['responsive'],
|
||||
borderCollapse: [],
|
||||
borderColors: ['responsive', 'hover', 'focus'],
|
||||
}
|
||||
},
|
||||
})
|
||||
})
|
||||
|
||||
@ -137,24 +137,13 @@ test('theme key is merged instead of replaced', () => {
|
||||
colors: {
|
||||
'grey-darker': '#606f7b',
|
||||
'grey-dark': '#8795a1',
|
||||
'grey': '#b8c2cc',
|
||||
grey: '#b8c2cc',
|
||||
'grey-light': '#dae1e7',
|
||||
'grey-lighter': '#f1f5f8',
|
||||
},
|
||||
fonts: {
|
||||
sans: [
|
||||
'system-ui',
|
||||
'BlinkMacSystemFont',
|
||||
'-apple-system',
|
||||
'Roboto',
|
||||
'sans-serif',
|
||||
],
|
||||
serif: [
|
||||
'Constantia',
|
||||
'Lucida Bright',
|
||||
'Georgia',
|
||||
'serif',
|
||||
],
|
||||
sans: ['system-ui', 'BlinkMacSystemFont', '-apple-system', 'Roboto', 'sans-serif'],
|
||||
serif: ['Constantia', 'Lucida Bright', 'Georgia', 'serif'],
|
||||
},
|
||||
screens: {
|
||||
sm: '500px',
|
||||
@ -166,7 +155,7 @@ test('theme key is merged instead of replaced', () => {
|
||||
appearance: ['responsive'],
|
||||
borderCollapse: [],
|
||||
borderColors: ['responsive', 'hover', 'focus'],
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
const result = mergeConfigWithDefaults(userConfig, defaultConfig)
|
||||
@ -179,24 +168,13 @@ test('theme key is merged instead of replaced', () => {
|
||||
colors: {
|
||||
'grey-darker': '#606f7b',
|
||||
'grey-dark': '#8795a1',
|
||||
'grey': '#b8c2cc',
|
||||
grey: '#b8c2cc',
|
||||
'grey-light': '#dae1e7',
|
||||
'grey-lighter': '#f1f5f8',
|
||||
},
|
||||
fonts: {
|
||||
sans: [
|
||||
'system-ui',
|
||||
'BlinkMacSystemFont',
|
||||
'-apple-system',
|
||||
'Roboto',
|
||||
'sans-serif',
|
||||
],
|
||||
serif: [
|
||||
'Constantia',
|
||||
'Lucida Bright',
|
||||
'Georgia',
|
||||
'serif',
|
||||
],
|
||||
sans: ['system-ui', 'BlinkMacSystemFont', '-apple-system', 'Roboto', 'sans-serif'],
|
||||
serif: ['Constantia', 'Lucida Bright', 'Georgia', 'serif'],
|
||||
},
|
||||
screens: {
|
||||
mobile: '400px',
|
||||
@ -206,7 +184,7 @@ test('theme key is merged instead of replaced', () => {
|
||||
appearance: ['responsive'],
|
||||
borderCollapse: [],
|
||||
borderColors: ['responsive', 'hover', 'focus'],
|
||||
}
|
||||
},
|
||||
})
|
||||
})
|
||||
|
||||
@ -215,7 +193,7 @@ test('variants key is merged instead of replaced', () => {
|
||||
variants: {
|
||||
backgroundAttachment: [],
|
||||
borderColors: ['responsive', 'hover', 'focus', 'active'],
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
const defaultConfig = {
|
||||
@ -226,24 +204,13 @@ test('variants key is merged instead of replaced', () => {
|
||||
colors: {
|
||||
'grey-darker': '#606f7b',
|
||||
'grey-dark': '#8795a1',
|
||||
'grey': '#b8c2cc',
|
||||
grey: '#b8c2cc',
|
||||
'grey-light': '#dae1e7',
|
||||
'grey-lighter': '#f1f5f8',
|
||||
},
|
||||
fonts: {
|
||||
sans: [
|
||||
'system-ui',
|
||||
'BlinkMacSystemFont',
|
||||
'-apple-system',
|
||||
'Roboto',
|
||||
'sans-serif',
|
||||
],
|
||||
serif: [
|
||||
'Constantia',
|
||||
'Lucida Bright',
|
||||
'Georgia',
|
||||
'serif',
|
||||
],
|
||||
sans: ['system-ui', 'BlinkMacSystemFont', '-apple-system', 'Roboto', 'sans-serif'],
|
||||
serif: ['Constantia', 'Lucida Bright', 'Georgia', 'serif'],
|
||||
},
|
||||
screens: {
|
||||
sm: '500px',
|
||||
@ -257,7 +224,7 @@ test('variants key is merged instead of replaced', () => {
|
||||
borderCollapse: [],
|
||||
borderColors: ['responsive', 'hover', 'focus'],
|
||||
borderRadius: ['responsive'],
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
const result = mergeConfigWithDefaults(userConfig, defaultConfig)
|
||||
@ -270,24 +237,13 @@ test('variants key is merged instead of replaced', () => {
|
||||
colors: {
|
||||
'grey-darker': '#606f7b',
|
||||
'grey-dark': '#8795a1',
|
||||
'grey': '#b8c2cc',
|
||||
grey: '#b8c2cc',
|
||||
'grey-light': '#dae1e7',
|
||||
'grey-lighter': '#f1f5f8',
|
||||
},
|
||||
fonts: {
|
||||
sans: [
|
||||
'system-ui',
|
||||
'BlinkMacSystemFont',
|
||||
'-apple-system',
|
||||
'Roboto',
|
||||
'sans-serif',
|
||||
],
|
||||
serif: [
|
||||
'Constantia',
|
||||
'Lucida Bright',
|
||||
'Georgia',
|
||||
'serif',
|
||||
],
|
||||
sans: ['system-ui', 'BlinkMacSystemFont', '-apple-system', 'Roboto', 'sans-serif'],
|
||||
serif: ['Constantia', 'Lucida Bright', 'Georgia', 'serif'],
|
||||
},
|
||||
screens: {
|
||||
sm: '500px',
|
||||
@ -301,7 +257,7 @@ test('variants key is merged instead of replaced', () => {
|
||||
borderCollapse: [],
|
||||
borderColors: ['responsive', 'hover', 'focus', 'active'],
|
||||
borderRadius: ['responsive'],
|
||||
}
|
||||
},
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
@ -1,21 +1,21 @@
|
||||
module.exports = function () {
|
||||
module.exports = function() {
|
||||
const colors = {
|
||||
transparent: 'transparent',
|
||||
|
||||
'black': '#22292f',
|
||||
black: '#22292f',
|
||||
'grey-darkest': '#3d4852',
|
||||
'grey-darker': '#606f7b',
|
||||
'grey-dark': '#8795a1',
|
||||
'grey': '#b8c2cc',
|
||||
grey: '#b8c2cc',
|
||||
'grey-light': '#dae1e7',
|
||||
'grey-lighter': '#f1f5f8',
|
||||
'grey-lightest': '#f8fafc',
|
||||
'white': '#ffffff',
|
||||
white: '#ffffff',
|
||||
|
||||
'red-darkest': '#3b0d0c',
|
||||
'red-darker': '#621b18',
|
||||
'red-dark': '#cc1f1a',
|
||||
'red': '#e3342f',
|
||||
red: '#e3342f',
|
||||
'red-light': '#ef5753',
|
||||
'red-lighter': '#f9acaa',
|
||||
'red-lightest': '#fcebea',
|
||||
@ -23,7 +23,7 @@ module.exports = function () {
|
||||
'orange-darkest': '#462a16',
|
||||
'orange-darker': '#613b1f',
|
||||
'orange-dark': '#de751f',
|
||||
'orange': '#f6993f',
|
||||
orange: '#f6993f',
|
||||
'orange-light': '#faad63',
|
||||
'orange-lighter': '#fcd9b6',
|
||||
'orange-lightest': '#fff5eb',
|
||||
@ -31,7 +31,7 @@ module.exports = function () {
|
||||
'yellow-darkest': '#453411',
|
||||
'yellow-darker': '#684f1d',
|
||||
'yellow-dark': '#f2d024',
|
||||
'yellow': '#ffed4a',
|
||||
yellow: '#ffed4a',
|
||||
'yellow-light': '#fff382',
|
||||
'yellow-lighter': '#fff9c2',
|
||||
'yellow-lightest': '#fcfbeb',
|
||||
@ -39,7 +39,7 @@ module.exports = function () {
|
||||
'green-darkest': '#0f2f21',
|
||||
'green-darker': '#1a4731',
|
||||
'green-dark': '#1f9d55',
|
||||
'green': '#38c172',
|
||||
green: '#38c172',
|
||||
'green-light': '#51d88a',
|
||||
'green-lighter': '#a2f5bf',
|
||||
'green-lightest': '#e3fcec',
|
||||
@ -47,7 +47,7 @@ module.exports = function () {
|
||||
'teal-darkest': '#0d3331',
|
||||
'teal-darker': '#20504f',
|
||||
'teal-dark': '#38a89d',
|
||||
'teal': '#4dc0b5',
|
||||
teal: '#4dc0b5',
|
||||
'teal-light': '#64d5ca',
|
||||
'teal-lighter': '#a0f0ed',
|
||||
'teal-lightest': '#e8fffe',
|
||||
@ -55,7 +55,7 @@ module.exports = function () {
|
||||
'blue-darkest': '#12283a',
|
||||
'blue-darker': '#1c3d5a',
|
||||
'blue-dark': '#2779bd',
|
||||
'blue': '#3490dc',
|
||||
blue: '#3490dc',
|
||||
'blue-light': '#6cb2eb',
|
||||
'blue-lighter': '#bcdefa',
|
||||
'blue-lightest': '#eff8ff',
|
||||
@ -63,7 +63,7 @@ module.exports = function () {
|
||||
'indigo-darkest': '#191e38',
|
||||
'indigo-darker': '#2f365f',
|
||||
'indigo-dark': '#5661b3',
|
||||
'indigo': '#6574cd',
|
||||
indigo: '#6574cd',
|
||||
'indigo-light': '#7886d7',
|
||||
'indigo-lighter': '#b2b7ff',
|
||||
'indigo-lightest': '#e6e8ff',
|
||||
@ -71,7 +71,7 @@ module.exports = function () {
|
||||
'purple-darkest': '#21183c',
|
||||
'purple-darker': '#382b5f',
|
||||
'purple-dark': '#794acf',
|
||||
'purple': '#9561e2',
|
||||
purple: '#9561e2',
|
||||
'purple-light': '#a779e9',
|
||||
'purple-lighter': '#d6bbfc',
|
||||
'purple-lightest': '#f3ebff',
|
||||
@ -79,19 +79,19 @@ module.exports = function () {
|
||||
'pink-darkest': '#451225',
|
||||
'pink-darker': '#6f213f',
|
||||
'pink-dark': '#eb5286',
|
||||
'pink': '#f66d9b',
|
||||
pink: '#f66d9b',
|
||||
'pink-light': '#fa7ea8',
|
||||
'pink-lighter': '#ffbbca',
|
||||
'pink-lightest': '#ffebef',
|
||||
}
|
||||
|
||||
return {
|
||||
colors: colors,
|
||||
colors,
|
||||
screens: {
|
||||
'sm': '576px',
|
||||
'md': '768px',
|
||||
'lg': '992px',
|
||||
'xl': '1200px',
|
||||
sm: '576px',
|
||||
md: '768px',
|
||||
lg: '992px',
|
||||
xl: '1200px',
|
||||
},
|
||||
fonts: {
|
||||
sans: [
|
||||
@ -120,14 +120,7 @@ module.exports = function () {
|
||||
'Georgia',
|
||||
'serif',
|
||||
],
|
||||
mono: [
|
||||
'Menlo',
|
||||
'Monaco',
|
||||
'Consolas',
|
||||
'Liberation Mono',
|
||||
'Courier New',
|
||||
'monospace'
|
||||
],
|
||||
mono: ['Menlo', 'Monaco', 'Consolas', 'Liberation Mono', 'Courier New', 'monospace'],
|
||||
},
|
||||
textSizes: {
|
||||
xs: '.75rem', // 12px
|
||||
|
||||
@ -1,8 +1,12 @@
|
||||
import _ from 'lodash'
|
||||
|
||||
export default function(userConfig, defaultConfig) {
|
||||
return _.defaults({
|
||||
theme: _.defaults(userConfig.theme, defaultConfig.theme),
|
||||
variants: _.defaults(userConfig.variants, defaultConfig.variants),
|
||||
}, userConfig, defaultConfig)
|
||||
return _.defaults(
|
||||
{
|
||||
theme: _.defaults(userConfig.theme, defaultConfig.theme),
|
||||
variants: _.defaults(userConfig.variants, defaultConfig.variants),
|
||||
},
|
||||
userConfig,
|
||||
defaultConfig
|
||||
)
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user