From b2e84011a8b7937210dd998394dcb0d2ae791150 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Sat, 9 Mar 2019 22:46:07 +0000 Subject: [PATCH] Update tailwind.config.js --- tailwind.config.js | 89 +++++++++++++++++----------------------------- 1 file changed, 33 insertions(+), 56 deletions(-) diff --git a/tailwind.config.js b/tailwind.config.js index ad175893..a3eacae5 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -1,65 +1,42 @@ -const _ = require('lodash') - -let defaultConfig = require('tailwindcss/defaultConfig')() - -var colors = { - ...defaultConfig.colors, - 'inherit': 'inherit', - 'black': '#222b2f', - 'blue': 'hsl(203, 94%, 38%)', - 'blue-dark': '#2779bd', - 'blue-lighter': '#bcdefa', - 'green-dark': '#1f9d55', - 'grey': '#9babb4', - 'grey-dark': '#70818a', - 'grey-darker': '#596a73', - 'grey-light': 'hsl(203, 25%, 88%)', - 'grey-lighter': 'hsl(203, 22%, 95%)', - 'grey-lightest': '#fafcfc', - 'orange': '#f6993f', - 'red-dark': '#cc1f1a', -} +let defaultTheme = require('tailwindcss/defaultTheme')() module.exports = { - ...defaultConfig, - colors: colors, - textColors: colors, - backgroundColors: colors, - borderColors: Object.assign({ default: colors['grey-light'] }, colors), - fonts: { - ...defaultConfig.fonts, - 'mono': ['Roboto Mono', ...defaultConfig.fonts.mono], - }, - fontWeights: _.pick(defaultConfig.fontWeights, ['normal', 'medium', 'bold']), - margin: { - ...defaultConfig.margin, - '2px': '2px', - }, - borderWidths: { - ...defaultConfig.borderWidths, - '3': '3px', - }, - borderRadius: { - ...defaultConfig.borderRadius, - 'none': '0', - }, - modules: { - ...defaultConfig.modules, - borderStyle: ['responsive', 'hover', 'focus'], - borderWidths: ['responsive', 'hover', 'focus'], + theme: { + extend: { + color: { + blue: { + dark: '#2779bd', + default: 'hsl(203, 94%, 38%)', + lighter: '#bcdefa', + }, + grey: { + dark: '#70818a', + darker: '#596a73', + default: '#9babb4', + light: 'hsl(203, 25%, 88%)', + lighter: 'hsl(203, 22%, 95%)', + lightest: '#fafcfc', + }, + }, + fontFamily: { + mono: [ 'Roboto Mono', ...defaultTheme.fontFamily.mono ], + }, + spacing: { + '2px': '2px', + }, + borderWidth: { + '3': '3px', + }, + }, }, plugins: [ - require('tailwindcss/plugins/container')({ - center: true, - padding: '1rem', - }), - require('tailwindcss-spaced-items')(), + require('tailwindcss-spaced-items')({ values: defaultTheme.spacing }), require('tailwindcss-visuallyhidden')(), require('tailwindcss-skip-link')(), require('tailwindcss-vuejs')(), ], - options: { - ...defaultConfig.options, - important: true, - } + variants: { + borderStyle: ['responsive', 'hover', 'focus'], + borderWidths: ['responsive', 'hover', 'focus'], + }, }