Skip to content

Instantly share code, notes, and snippets.

@marklj
Created December 7, 2018 17:23
Show Gist options
  • Save marklj/fba4b070cbb4a4810c340b69419113b2 to your computer and use it in GitHub Desktop.
Save marklj/fba4b070cbb4a4810c340b69419113b2 to your computer and use it in GitHub Desktop.
TailwindCSS configuration file to closely match the U.S. Web Design System (https://v2.designsystem.digital.gov)
/*
Tailwind - The Utility-First CSS Framework
A project by Adam Wathan (@adamwathan), Jonathan Reinink (@reinink),
David Hemphill (@davidhemphill) and Steve Schoger (@steveschoger).
Welcome to the Tailwind config file. This is where you can customize
Tailwind specifically for your project. Don't be intimidated by the
length of this file. It's really just a big JavaScript object and
we've done our very best to explain each section.
View the full documentation at https://tailwindcss.com.
|-------------------------------------------------------------------------------
| The default config
|-------------------------------------------------------------------------------
|
| This variable contains the default Tailwind config. You don't have
| to use it, but it can sometimes be helpful to have available. For
| example, you may choose to merge your custom configuration
| values with some of the Tailwind defaults.
|
*/
// let defaultConfig = require('tailwindcss/defaultConfig')()
/*
|-------------------------------------------------------------------------------
| Colors https://tailwindcss.com/docs/colors
|-------------------------------------------------------------------------------
|
| Here you can specify the colors used in your project. To get you started,
| we've provided a generous palette of great looking colors that are perfect
| for prototyping, but don't hesitate to change them for your project. You
| own these colors, nothing will break if you change everything about them.
|
| We've used literal color names ("red", "blue", etc.) for the default
| palette, but if you'd rather use functional names like "primary" and
| "secondary", or even a numeric scale like "100" and "200", go for it.
|
*/
let colors = {
'transparent': 'transparent',
'base-lightest': '#f0f0f0',
'base-lighter': '#dbdee1',
'base-light': '#adadad',
'base': '#757575',
'base-dark': '#585c62',
'base-darker': '#2d2e2f',
'base-darkest': '#171717',
'ink': '#171717',
'primary-lighter': '#d9e8f6',
'primary-light': '#73b3e7',
'primary': '#005ea2',
'primary-vivid': '#0050d8',
'primary-dark': '#1a4480',
'primary-darker': '#162e51',
'secondary-lighter': '#f8e1de',
'secondary-light': '#f2938c',
'secondary': '#d83933',
'secondary-vivid': '#e52207',
'secondary-dark': '#b51d09',
'secondary-darker': '#8b1303',
'accent-cool-lighter': '#e7f6f8',
'accent-cool-light': '#9ddfeb',
'accent-cool': '#00bde3',
'accent-cool-dark': '#009ec1',
'accent-cool-darker': '#2c608a',
'accent-warm-lighter': '#fce2c5',
'accent-warm-light': '#ffbc78',
'accent-warm': '#fa9441',
'accent-warm-dark': '#c05600',
'accent-warm-darker': '#73563e',
'info-lighter': '#e7f6f8',
'info-light': '#9ddfeb',
'info': '#00bde3',
'info-dark': '#009ec1',
'info-darker': '#2c608a',
'error-lighter': '#f8e1de',
'error-light': '#fb5a47',
'error': '#d83933',
'error-dark': '#b51d09',
'error-darker': '#8b1303',
'warning-lighter': '#fef0c8',
'warning-light': '#ffe3a3',
'warning': '#fbc036',
'warning-dark': '#e5a000',
'warning-darker': '#c2850c',
'success-lighter': '#e3f5e1',
'success-light': '#2cc821',
'success': '#0ca900',
'success-dark': '#3e8520',
'success-darker': '#364b29',
'disabled': '#c9c9c9',
'red': '#e52207',
'orange': '#e66f0e',
'gold': '#fbc036',
'yellow': '#fee685',
'green': '#538200',
'mint': '#04c585',
'cyan': '#009ec1',
'blue': '#0076d6',
'indigo': '#676cc8',
'violet': '#8168b3',
'magenta': '#d72d79',
'red-warm-5': '#f6efea',
'red-warm-10': '#f4e3db',
'red-warm-20': '#ecc0a7',
'red-warm-30': '#dca081',
'red-warm-40': '#d27a56',
'red-warm-50': '#c3512c',
'red-warm-60': '#805039',
'red-warm-70': '#524236',
'red-warm-80': '#332d29',
'red-warm-90': '#1f1c18',
'red-warm-20v': '#f6bd9c',
'red-warm-30v': '#f39268',
'red-warm-40v': '#ee601d',
'red-warm-50v': '#d63e04',
'red-5': '#f9eeee',
'red-10': '#f8e1de',
'red-20': '#f7bbb1',
'red-30': '#f2938c',
'red-40': '#e9695f',
'red-50': '#d83933',
'red-60': '#a23737',
'red-70': '#6f3331',
'red-80': '#3e2927',
'red-90': '#1b1616',
'red-10v': '#fde0db',
'red-20v': '#fdb8ae',
'red-30v': '#ff8d7b',
'red-40v': '#fb5a47',
'red-50v': '#e52207',
'red-60v': '#b51d09',
'red-70v': '#8b1303',
'red-80v': '#5c1111',
'orange-warm-5': '#faeee5',
'orange-warm-10': '#fbe0d0',
'orange-warm-20': '#f7bca2',
'orange-warm-30': '#f3966d',
'orange-warm-40': '#e17141',
'orange-warm-50': '#bd5727',
'orange-warm-60': '#914734',
'orange-warm-70': '#633a32',
'orange-warm-80': '#3d2925',
'orange-warm-90': '#1c1615',
'orange-warm-20v': '#fbbaa7',
'orange-warm-30v': '#fc906d',
'orange-warm-40v': '#ff580a',
'orange-warm-50v': '#d24302',
'orange-5': '#fceee2',
'orange-10': '#fce2c5',
'orange-20': '#fabd87',
'orange-30': '#eb9b59',
'orange-40': '#db7725',
'orange-50': '#a36830',
'orange-60': '#73563e',
'orange-70': '#524236',
'orange-80': '#332d27',
'orange-90': '#1b1614',
'orange-5v': '#ffedda',
'orange-20v': '#ffbc78',
'orange-30v': '#fa9441',
'orange-40v': '#e66f0e',
'orange-50v': '#c05600',
'gold-5': '#f5f0e6',
'gold-10': '#f1e5cd',
'gold-20': '#dec69a',
'gold-30': '#c7a97b',
'gold-40': '#ad8b65',
'gold-50': '#8e704f',
'gold-60': '#6b5947',
'gold-70': '#4d4438',
'gold-80': '#322d26',
'gold-90': '#191714',
'gold-5v': '#fef0c8',
'gold-10v': '#ffe3a3',
'gold-20v': '#fbc036',
'gold-30v': '#e5a000',
'gold-40v': '#c2850c',
'gold-50v': '#936f38',
'yellow-5': '#faf3d1',
'yellow-10': '#f5e6af',
'yellow-20': '#e6c74c',
'yellow-30': '#c9ab48',
'yellow-40': '#a88f48',
'yellow-50': '#8a7237',
'yellow-60': '#6b5a39',
'yellow-70': '#504332',
'yellow-80': '#332d27',
'yellow-90': '#1a1614',
'yellow-10v': '#fee685',
'yellow-20v': '#ffcb00',
'green-warm-5': '#f1f4d7',
'green-warm-10': '#e7eab7',
'green-warm-20': '#cbd17a',
'green-warm-30': '#a6b557',
'green-warm-40': '#8a984b',
'green-warm-50': '#6f7a41',
'green-warm-60': '#5a5f38',
'green-warm-70': '#45472f',
'green-warm-80': '#2d2f21',
'green-warm-90': '#171712',
'green-warm-5v': '#f1f6a5',
'green-warm-10v': '#e2f106',
'green-warm-20v': '#c5d30a',
'green-warm-30v': '#a3b72c',
'green-warm-40v': '#7e9c1d',
'green-warm-50v': '#6a7d00',
'green-5': '#eaf4dd',
'green-10': '#dfeacd',
'green-20': '#b8d293',
'green-30': '#9bb672',
'green-40': '#7d9b4e',
'green-50': '#607f35',
'green-60': '#4c6424',
'green-70': '#3c4a29',
'green-80': '#293021',
'green-90': '#161814',
'green-5v': '#ddf9c7',
'green-10v': '#c3ee90',
'green-20v': '#98d035',
'green-30v': '#7fb135',
'green-40v': '#719f2a',
'green-50v': '#538200',
'green-cool-5': '#e3f5e1',
'green-cool-10': '#caf0c7',
'green-cool-20': '#9cd899',
'green-cool-30': '#77bd75',
'green-cool-40': '#52a251',
'green-cool-50': '#3e8520',
'green-cool-60': '#466432',
'green-cool-70': '#364b29',
'green-cool-80': '#293024',
'green-cool-90': '#141814',
'green-cool-5v': '#dcf8da',
'green-cool-10v': '#a4ef9f',
'green-cool-20v': '#6dd765',
'green-cool-30v': '#2cc821',
'green-cool-40v': '#0ca900',
'green-cool-50v': '#178800',
'mint-5': '#c9fbeb',
'mint-10': '#97f9d8',
'mint-20': '#48e1af',
'mint-30': '#48c198',
'mint-40': '#34a37e',
'mint-50': '#1f8462',
'mint-60': '#286846',
'mint-70': '#204e34',
'mint-80': '#193324',
'mint-90': '#0d1a12',
'mint-5v': '#befde9',
'mint-10v': '#5dfdc8',
'mint-20v': '#0ceda6',
'mint-30v': '#04c585',
'mint-60v': '#146947',
'mint-cool-5': '#e0f7f6',
'mint-cool-10': '#c4eeeb',
'mint-cool-20': '#9bd4cf',
'mint-cool-30': '#6fbab3',
'mint-cool-40': '#4f9e99',
'mint-cool-50': '#21827f',
'mint-cool-60': '#376462',
'mint-cool-70': '#2a4b45',
'mint-cool-80': '#203131',
'mint-cool-90': '#111818',
'mint-cool-5v': '#d5fbf3',
'mint-cool-10v': '#7efbe1',
'mint-cool-20v': '#29e1cb',
'mint-cool-30v': '#1dc2ae',
'mint-cool-40v': '#00a398',
'cyan-5': '#e7f6f8',
'cyan-10': '#ccecf2',
'cyan-20': '#9ddfeb',
'cyan-30': '#6ecbdb',
'cyan-40': '#449dac',
'cyan-50': '#168092',
'cyan-60': '#2a646d',
'cyan-70': '#2c4a4e',
'cyan-80': '#203133',
'cyan-90': '#111819',
'cyan-10v': '#a8f2ff',
'cyan-20v': '#52daf2',
'cyan-30v': '#00bde3',
'cyan-40v': '#009ec1',
'blue-5': '#eff6fb',
'blue-10': '#d9e8f6',
'blue-20': '#aacdec',
'blue-30': '#73b3e7',
'blue-40': '#4f97d1',
'blue-50': '#357ab2',
'blue-60': '#2c608a',
'blue-70': '#274863',
'blue-80': '#1f303e',
'blue-90': '#11181d',
'blue-30v': '#58b4ff',
'blue-40v': '#0096f4',
'blue-50v': '#0076d6',
'blue-60v': '#005ea2',
'blue-70v': '#0b4778',
'blue-80v': '#112f4e',
'blue-warm-5': '#ecf1f7',
'blue-warm-10': '#dfe7f5',
'blue-warm-20': '#bccae6',
'blue-warm-30': '#93afda',
'blue-warm-40': '#6f92ca',
'blue-warm-50': '#3e76c2',
'blue-warm-60': '#345d96',
'blue-warm-70': '#2f4668',
'blue-warm-80': '#252f3e',
'blue-warm-90': '#13171f',
'blue-warm-20v': '#b7caf0',
'blue-warm-30v': '#81aefc',
'blue-warm-40v': '#5994f6',
'blue-warm-50v': '#2672de',
'blue-warm-60v': '#0050d8',
'blue-warm-70v': '#1a4480',
'blue-warm-80v': '#162e51',
'indigo-cool-5': '#eef0f9',
'indigo-cool-10': '#e1e6f9',
'indigo-cool-20': '#bbc8f5',
'indigo-cool-30': '#96abee',
'indigo-cool-40': '#6b8ee8',
'indigo-cool-50': '#496fd8',
'indigo-cool-60': '#3f57a6',
'indigo-cool-70': '#374274',
'indigo-cool-80': '#292d42',
'indigo-cool-90': '#151622',
'indigo-cool-40v': '#628ef4',
'indigo-cool-60v': '#4150f2',
'indigo-5': '#efeff8',
'indigo-10': '#e5e4fa',
'indigo-20': '#c5c5f3',
'indigo-30': '#a5a8eb',
'indigo-40': '#8889db',
'indigo-50': '#676cc8',
'indigo-60': '#4d52af',
'indigo-70': '#3d4076',
'indigo-80': '#2b2c40',
'indigo-90': '#16171f',
'indigo-20v': '#c4c6f2',
'indigo-30v': '#a5a8e8',
'indigo-50v': '#656bd7',
'indigo-60v': '#4d52b0',
'indigo-warm-5': '#f1eff7',
'indigo-warm-10': '#e7e3fa',
'indigo-warm-20': '#cbc4f2',
'indigo-warm-30': '#afa5e8',
'indigo-warm-40': '#9287d8',
'indigo-warm-50': '#7665d1',
'indigo-warm-60': '#5e519e',
'indigo-warm-70': '#453c7b',
'indigo-warm-80': '#2e2c40',
'indigo-warm-90': '#18161d',
'indigo-warm-30v': '#b69fff',
'indigo-warm-40v': '#967efb',
'indigo-warm-50v': '#745fe9',
'indigo-warm-60v': '#5942d2',
'violet-5': '#f4f1f9',
'violet-10': '#ebe3f9',
'violet-20': '#d0c3e9',
'violet-30': '#b8a2e3',
'violet-40': '#9d84d2',
'violet-50': '#8168b3',
'violet-60': '#665190',
'violet-70': '#4c3d69',
'violet-80': '#312b3f',
'violet-90': '#18161d',
'violet-30v': '#c39deb',
'violet-40v': '#ad79e9',
'violet-50v': '#9355dc',
'violet-60v': '#783cb9',
'violet-70v': '#562b97',
'violet-warm-5': '#f8f0f9',
'violet-warm-10': '#f6dff8',
'violet-warm-20': '#e2bee4',
'violet-warm-30': '#d29ad8',
'violet-warm-40': '#bf77c8',
'violet-warm-50': '#b04abd',
'violet-warm-60': '#864381',
'violet-warm-70': '#5c395a',
'violet-warm-80': '#382936',
'violet-warm-90': '#1b151b',
'violet-warm-5v': '#fbebfd',
'violet-warm-10v': '#fbdcff',
'violet-warm-20v': '#f4b2ff',
'violet-warm-30v': '#ee83ff',
'violet-warm-40v': '#d85bef',
'violet-warm-50v': '#be32d0',
'magenta-5': '#f9f0f2',
'magenta-10': '#f6e1e8',
'magenta-20': '#f0bbcc',
'magenta-30': '#e895b3',
'magenta-40': '#e0699f',
'magenta-50': '#c84281',
'magenta-60': '#8b4566',
'magenta-70': '#66364b',
'magenta-80': '#402731',
'magenta-90': '#1b1617',
'magenta-10v': '#ffddea',
'magenta-20v': '#ffb4cf',
'magenta-30v': '#ff87b2',
'magenta-40v': '#fd4496',
'magenta-50v': '#d72d79',
'magenta-60v': '#ab2165',
'gray-cool-1': '#fbfcfd',
'gray-cool-2': '#f7f9fa',
'gray-cool-3': '#f5f6f7',
'gray-cool-4': '#f1f3f6',
'gray-cool-5': '#edeff0',
'gray-cool-10': '#dbdee1',
'gray-cool-20': '#c6cace',
'gray-cool-30': '#a9aeb1',
'gray-cool-40': '#8d9297',
'gray-cool-50': '#71767a',
'gray-cool-60': '#585c62',
'gray-cool-70': '#424549',
'gray-cool-80': '#2d2e2f',
'gray-cool-90': '#1c1d1f',
'gray-1': '#fcfcfc',
'gray-2': '#f9f9f9',
'gray-3': '#f6f6f6',
'gray-4': '#f3f3f3',
'gray-5': '#f0f0f0',
'gray-10': '#e6e6e6',
'gray-20': '#c9c9c9',
'gray-30': '#adadad',
'gray-40': '#919191',
'gray-50': '#757575',
'gray-60': '#5c5c5c',
'gray-70': '#454545',
'gray-80': '#2e2e2e',
'gray-90': '#171717',
'gray-warm-1': '#fcfcfb',
'gray-warm-2': '#f9f9f7',
'gray-warm-3': '#f6f6f2',
'gray-warm-4': '#f5f5f0',
'gray-warm-5': '#f0f0ec',
'gray-warm-10': '#e6e6e2',
'gray-warm-20': '#cac9c0',
'gray-warm-30': '#afaea2',
'gray-warm-40': '#929285',
'gray-warm-50': '#76766a',
'gray-warm-60': '#5d5d52',
'gray-warm-70': '#454540',
'gray-warm-80': '#2e2e2a',
'gray-warm-90': '#171716',
'black': '#000000',
'grey-90': '#171717',
'grey-70': '#454545',
'grey-50': '#757575',
'grey-30': '#adadad',
'grey-10': '#e6e6e6',
'grey-5': '#f0f0f0',
'white': '#ffffff',
}
module.exports = {
/*
|-----------------------------------------------------------------------------
| Colors https://tailwindcss.com/docs/colors
|-----------------------------------------------------------------------------
|
| The color palette defined above is also assigned to the "colors" key of
| your Tailwind config. This makes it easy to access them in your CSS
| using Tailwind's config helper. For example:
|
| .error { color: config('colors.red') }
|
*/
colors: colors,
/*
|-----------------------------------------------------------------------------
| Screens https://tailwindcss.com/docs/responsive-design
|-----------------------------------------------------------------------------
|
| Screens in Tailwind are translated to CSS media queries. They define the
| responsive breakpoints for your project. By default Tailwind takes a
| "mobile first" approach, where each screen size represents a minimum
| viewport width. Feel free to have as few or as many screens as you
| want, naming them in whatever way you'd prefer for your project.
|
| Tailwind also allows for more complex screen definitions, which can be
| useful in certain situations. Be sure to see the full responsive
| documentation for a complete list of options.
|
| Class name: .{screen}:{utility}
|
*/
screens: {
'mobile-lg': '480px',
'tablet': '640px',
'desktop': '1024px',
},
/*
|-----------------------------------------------------------------------------
| Fonts https://tailwindcss.com/docs/fonts
|-----------------------------------------------------------------------------
|
| Here is where you define your project's font stack, or font families.
| Keep in mind that Tailwind doesn't actually load any fonts for you.
| If you're using custom fonts you'll need to import them prior to
| defining them here.
|
| By default we provide a native font stack that works remarkably well on
| any device or OS you're using, since it just uses the default fonts
| provided by the platform.
|
| Class name: .font-{name}
| CSS property: font-family
|
*/
fonts: {
'sans': [
'Public Sans',
'system-ui',
'BlinkMacSystemFont',
'-apple-system',
'Segoe UI',
'Roboto',
'Oxygen',
'Ubuntu',
'Cantarell',
'Fira Sans',
'Droid Sans',
'Helvetica Neue',
'sans-serif',
],
'serif': [
'Merriweather',
'Constantia',
'Lucida Bright',
'Lucidabright',
'Lucida Serif',
'Lucida',
'DejaVu Serif',
'Bitstream Vera Serif',
'Liberation Serif',
'Georgia',
'serif',
],
'mono': [
'Roboto Mono',
'Menlo',
'Monaco',
'Consolas',
'Liberation Mono',
'Courier New',
'monospace',
],
},
/*
|-----------------------------------------------------------------------------
| Text sizes https://tailwindcss.com/docs/text-sizing
|-----------------------------------------------------------------------------
|
| Here is where you define your text sizes. Name these in whatever way
| makes the most sense to you. We use size names by default, but
| you're welcome to use a numeric scale or even something else
| entirely.
|
| By default Tailwind uses the "rem" unit type for most measurements.
| This allows you to set a root font size which all other sizes are
| then based on. That said, you are free to use whatever units you
| prefer, be it rems, ems, pixels or other.
|
| Class name: .text-{size}
| CSS property: font-size
|
*/
textSizes: {
'3xs': '12px', // 12px
'2xs': '14px', // 14px
'xs': '16px', // 16px
'sm': '17px', // 18px
'md': '18px', // 20px
'lg': '24px', // 24px
'xl': '32px', // 30px
},
/*
|-----------------------------------------------------------------------------
| Font weights https://tailwindcss.com/docs/font-weight
|-----------------------------------------------------------------------------
|
| Here is where you define your font weights. We've provided a list of
| common font weight names with their respective numeric scale values
| to get you started. It's unlikely that your project will require
| all of these, so we recommend removing those you don't need.
|
| Class name: .font-{weight}
| CSS property: font-weight
|
*/
fontWeights: {
'thin': 200,
'light': 300,
'normal': 400,
'medium': 500,
'semibold': 600,
'bold': 700,
'heavy': 800,
},
/*
|-----------------------------------------------------------------------------
| Leading (line height) https://tailwindcss.com/docs/line-height
|-----------------------------------------------------------------------------
|
| Here is where you define your line height values, or as we call
| them in Tailwind, leadings.
|
| Class name: .leading-{size}
| CSS property: line-height
|
*/
leading: {
'1': 1,
'2': 1.15,
'3': 1.35,
'4': 1.5,
'5': 1.62,
'6': 1.75,
},
/*
|-----------------------------------------------------------------------------
| Tracking (letter spacing) https://tailwindcss.com/docs/letter-spacing
|-----------------------------------------------------------------------------
|
| Here is where you define your letter spacing values, or as we call
| them in Tailwind, tracking.
|
| Class name: .tracking-{size}
| CSS property: letter-spacing
|
*/
tracking: {
'neg-3': '-.03em',
'neg-2': '-.02em',
'neg-1': '-.01em',
'auto': 'auto',
'1': '.05em',
'2': '.1em',
'3': '.15em',
},
/*
|-----------------------------------------------------------------------------
| Text colors https://tailwindcss.com/docs/text-color
|-----------------------------------------------------------------------------
|
| Here is where you define your text colors. By default these use the
| color palette we defined above, however you're welcome to set these
| independently if that makes sense for your project.
|
| Class name: .text-{color}
| CSS property: color
|
*/
textColors: colors,
/*
|-----------------------------------------------------------------------------
| Background colors https://tailwindcss.com/docs/background-color
|-----------------------------------------------------------------------------
|
| Here is where you define your background colors. By default these use
| the color palette we defined above, however you're welcome to set
| these independently if that makes sense for your project.
|
| Class name: .bg-{color}
| CSS property: background-color
|
*/
backgroundColors: colors,
/*
|-----------------------------------------------------------------------------
| Background sizes https://tailwindcss.com/docs/background-size
|-----------------------------------------------------------------------------
|
| Here is where you define your background sizes. We provide some common
| values that are useful in most projects, but feel free to add other sizes
| that are specific to your project here as well.
|
| Class name: .bg-{size}
| CSS property: background-size
|
*/
backgroundSize: {
'auto': 'auto',
'cover': 'cover',
'contain': 'contain',
},
/*
|-----------------------------------------------------------------------------
| Border widths https://tailwindcss.com/docs/border-width
|-----------------------------------------------------------------------------
|
| Here is where you define your border widths. Take note that border
| widths require a special "default" value set as well. This is the
| width that will be used when you do not specify a border width.
|
| Class name: .border{-side?}{-width?}
| CSS property: border-width
|
*/
borderWidths: {
default: '1px',
'0': '0',
'1px': '1px',
'2px': '2px',
'05': '4px',
'1': '8px',
'105': '12px',
'2': '16px',
'205': '20px',
'3': '24px',
// '2': '2px',
// '4': '4px',
// '8': '8px',
},
/*
|-----------------------------------------------------------------------------
| Border colors https://tailwindcss.com/docs/border-color
|-----------------------------------------------------------------------------
|
| Here is where you define your border colors. By default these use the
| color palette we defined above, however you're welcome to set these
| independently if that makes sense for your project.
|
| Take note that border colors require a special "default" value set
| as well. This is the color that will be used when you do not
| specify a border color.
|
| Class name: .border-{color}
| CSS property: border-color
|
*/
borderColors: global.Object.assign({ default: colors['base'] }, colors),
/*
|-----------------------------------------------------------------------------
| Border radius https://tailwindcss.com/docs/border-radius
|-----------------------------------------------------------------------------
|
| Here is where you define your border radius values. If a `default` radius
| is provided, it will be made available as the non-suffixed `.rounded`
| utility.
|
| If your scale includes a `0` value to reset already rounded corners, it's
| a good idea to put it first so other values are able to override it.
|
| Class name: .rounded{-side?}{-size?}
| CSS property: border-radius
|
*/
borderRadius: {
'none': '0',
'0': '0',
'sm': '2px',
'md': '4px',
default: '4px',
'lg': '8px',
'full': '9999px',
},
/*
|-----------------------------------------------------------------------------
| Width https://tailwindcss.com/docs/width
|-----------------------------------------------------------------------------
|
| Here is where you define your width utility sizes. These can be
| percentage based, pixels, rems, or any other units. By default
| we provide a sensible rem based numeric scale, a percentage
| based fraction scale, plus some other common use-cases. You
| can, of course, modify these values as needed.
|
|
| It's also worth mentioning that Tailwind automatically escapes
| invalid CSS class name characters, which allows you to have
| awesome classes like .w-2/3.
|
| Class name: .w-{size}
| CSS property: width
|
*/
width: {
'auto': 'auto',
'1px': '1px',
'2px': '2px',
'05': '4px',
'1': '8px',
'105': '12px',
'2': '16px',
'205': '20px',
'3': '24px',
'4': '32px',
'5': '40px',
'6': '48px',
'7': '56px',
'8': '64px',
'9': '72px',
'10': '80px',
'15': '120px',
'card': '160px',
'card-lg': '240px',
'mobile': '320px',
'mobile-lg': '480px',
'tablet': '640px',
'tablet-lg': '880px',
'desktop': '1024px',
'desktop-lg': '1200px',
'widescreen': '1400px',
'full': '100%',
'1/2': '50%',
'1/3': '33.33333%',
'2/3': '66.66667%',
'1/4': '25%',
'3/4': '75%',
'1/5': '20%',
'2/5': '40%',
'3/5': '60%',
'4/5': '80%',
'1/6': '16.66667%',
'5/6': '83.33333%',
'screen': '100vw',
},
/*
|-----------------------------------------------------------------------------
| Height https://tailwindcss.com/docs/height
|-----------------------------------------------------------------------------
|
| Here is where you define your height utility sizes. These can be
| percentage based, pixels, rems, or any other units. By default
| we provide a sensible rem based numeric scale plus some other
| common use-cases. You can, of course, modify these values as
| needed.
|
| Class name: .h-{size}
| CSS property: height
|
*/
height: {
'auto': 'auto',
'0': '0',
'1px': '1px',
'2px': '2px',
'05': '4px',
'1': '8px',
'105': '12px',
'2': '16px',
'205': '20px',
'3': '24px',
'4': '32px',
'5': '40px',
'6': '48px',
'7': '56px',
'8': '64px',
'9': '72px',
'10': '80px',
'15': '120px',
'card': '160px',
'card-lg': '240px',
'mobile': '320px',
'full': '100%',
'viewport': '100vw',
'screen': '100vh',
},
/*
|-----------------------------------------------------------------------------
| Minimum width https://tailwindcss.com/docs/min-width
|-----------------------------------------------------------------------------
|
| Here is where you define your minimum width utility sizes. These can
| be percentage based, pixels, rems, or any other units. We provide a
| couple common use-cases by default. You can, of course, modify
| these values as needed.
|
| Class name: .min-w-{size}
| CSS property: min-width
|
*/
minWidth: {
'0': '0',
'none': 'none',
'05': '4px',
'1': '8px',
'105': '12px',
'2': '16px',
'205': '20px',
'3': '24px',
'4': '32px',
'5': '40px',
'6': '48px',
'7': '56px',
'8': '64px',
'9': '72px',
'10': '80px',
'15': '120px',
'full': '100%',
},
/*
|-----------------------------------------------------------------------------
| Minimum height https://tailwindcss.com/docs/min-height
|-----------------------------------------------------------------------------
|
| Here is where you define your minimum height utility sizes. These can
| be percentage based, pixels, rems, or any other units. We provide a
| few common use-cases by default. You can, of course, modify these
| values as needed.
|
| Class name: .min-h-{size}
| CSS property: min-height
|
*/
minHeight: {
'0': '0',
'none': 'none',
'0': '0',
'05': '4px',
'1': '8px',
'105': '12px',
'2': '16px',
'205': '20px',
'3': '24px',
'4': '32px',
'5': '40px',
'6': '48px',
'7': '56px',
'8': '64px',
'9': '72px',
'10': '80px',
'15': '120px',
'card': '160px',
'card-lg': '240px',
'mobile': '320px',
'mobile-lg': '480px',
'tablet': '640px',
'tablet-lg': '880px',
'full': '100%',
'viewport': '100vw',
'screen': '100vh',
},
/*
|-----------------------------------------------------------------------------
| Maximum width https://tailwindcss.com/docs/max-width
|-----------------------------------------------------------------------------
|
| Here is where you define your maximum width utility sizes. These can
| be percentage based, pixels, rems, or any other units. By default
| we provide a sensible rem based scale and a "full width" size,
| which is basically a reset utility. You can, of course,
| modify these values as needed.
|
| Class name: .max-w-{size}
| CSS property: max-width
|
*/
maxWidth: {
'none': 'none',
'05': '4px',
'1': '8px',
'105': '12px',
'2': '16px',
'205': '20px',
'3': '24px',
'4': '32px',
'5': '40px',
'6': '48px',
'7': '56px',
'8': '64px',
'9': '72px',
'10': '80px',
'15': '120px',
'card': '160px',
'card-lg': '240px',
'mobile': '320px',
'mobile-lg': '480px',
'tablet': '640px',
'tablet-lg': '880px',
'desktop': '1024px',
'desktop-lg': '1200px',
'widescreen': '1400px',
'full': '100%'
},
/*
|-----------------------------------------------------------------------------
| Maximum height https://tailwindcss.com/docs/max-height
|-----------------------------------------------------------------------------
|
| Here is where you define your maximum height utility sizes. These can
| be percentage based, pixels, rems, or any other units. We provide a
| couple common use-cases by default. You can, of course, modify
| these values as needed.
|
| Class name: .max-h-{size}
| CSS property: max-height
|
*/
maxHeight: {
'none': 'none',
'05': '4px',
'1': '8px',
'105': '12px',
'2': '16px',
'205': '20px',
'3': '24px',
'4': '32px',
'5': '40px',
'6': '48px',
'7': '56px',
'8': '64px',
'9': '72px',
'10': '80px',
'15': '120px',
'card': '160px',
'card-lg': '240px',
'mobile': '320px',
'mobile-lg': '480px',
'tablet': '640px',
'tablet-lg': '880px',
'viewport': '100vw'
},
/*
|-----------------------------------------------------------------------------
| Padding https://tailwindcss.com/docs/padding
|-----------------------------------------------------------------------------
|
| Here is where you define your padding utility sizes. These can be
| percentage based, pixels, rems, or any other units. By default we
| provide a sensible rem based numeric scale plus a couple other
| common use-cases like "1px". You can, of course, modify these
| values as needed.
|
| Class name: .p{side?}-{size}
| CSS property: padding
|
*/
padding: {
'0': '0',
'1px': '1px',
'2px': '2px',
'05': '4px',
'1': '8px',
'105': '12px',
'2': '16px',
'205': '20px',
'3': '24px',
'4': '32px',
'5': '40px',
'6': '48px',
'7': '56px',
'8': '64px',
'9': '72px'
},
/*
|-----------------------------------------------------------------------------
| Margin https://tailwindcss.com/docs/margin
|-----------------------------------------------------------------------------
|
| Here is where you define your margin utility sizes. These can be
| percentage based, pixels, rems, or any other units. By default we
| provide a sensible rem based numeric scale plus a couple other
| common use-cases like "1px". You can, of course, modify these
| values as needed.
|
| Class name: .m{side?}-{size}
| CSS property: margin
|
*/
margin: {
'0': '0',
'1px': '1px',
'2px': '2px',
'05': '4px',
'1': '8px',
'105': '12px',
'2': '16px',
'205': '20px',
'3': '24px',
'4': '32px',
'5': '40px',
'6': '48px',
'7': '56px',
'8': '64px',
'9': '72px'
},
/*
|-----------------------------------------------------------------------------
| Negative margin https://tailwindcss.com/docs/negative-margin
|-----------------------------------------------------------------------------
|
| Here is where you define your negative margin utility sizes. These can
| be percentage based, pixels, rems, or any other units. By default we
| provide matching values to the padding scale since these utilities
| generally get used together. You can, of course, modify these
| values as needed.
|
| Class name: .-m{side?}-{size}
| CSS property: margin
|
*/
negativeMargin: {
'0': '0',
'1px': '1px',
'2px': '2px',
'05': '4px',
'1': '8px',
'105': '12px',
'2': '16px',
'205': '20px',
'3': '24px',
'4': '32px',
'5': '40px',
'6': '48px',
'7': '56px',
'8': '64px',
'9': '72px'
},
/*
|-----------------------------------------------------------------------------
| Shadows https://tailwindcss.com/docs/shadows
|-----------------------------------------------------------------------------
|
| Here is where you define your shadow utilities. As you can see from
| the defaults we provide, it's possible to apply multiple shadows
| per utility using comma separation.
|
| If a `default` shadow is provided, it will be made available as the non-
| suffixed `.shadow` utility.
|
| Class name: .shadow-{size?}
| CSS property: box-shadow
|
*/
shadows: {
default: '0 1px .25rem 0 rgba(0,0,0,.1)',
'0': '0',
'1': '0 1px 4px 0 rgba(0, 0, 0, 0.1)',
'2': '0 4px 8px 0 rgba(0, 0, 0, 0.1)',
'3': '0 8px 16px 0 rgba(0, 0, 0, 0.1)',
'4': '0 12px 24px 0 rgba(0, 0, 0, 0.1)',
'5': '0 16px 32px 0 rgba(0, 0, 0, 0.1)',
'none': 'none',
},
/*
|-----------------------------------------------------------------------------
| Z-index https://tailwindcss.com/docs/z-index
|-----------------------------------------------------------------------------
|
| Here is where you define your z-index utility values. By default we
| provide a sensible numeric scale. You can, of course, modify these
| values as needed.
|
| Class name: .z-{index}
| CSS property: z-index
|
*/
zIndex: {
'auto': 'auto',
'top': '99999',
'500': '500',
'400': '400',
'300': '300',
'200': '200',
'100': '100',
'0': 0,
'bottom': '-100'
},
/*
|-----------------------------------------------------------------------------
| Opacity https://tailwindcss.com/docs/opacity
|-----------------------------------------------------------------------------
|
| Here is where you define your opacity utility values. By default we
| provide a sensible numeric scale. You can, of course, modify these
| values as needed.
|
| Class name: .opacity-{name}
| CSS property: opacity
|
*/
opacity: {
'0': '0',
'10': '.1',
'20': '.2',
'30': '.3',
'40': '.4',
'50': '.5',
'60': '.6',
'70': '.7',
'80': '.8',
'90': '.9',
'100': '1',
},
/*
|-----------------------------------------------------------------------------
| SVG fill https://tailwindcss.com/docs/svg
|-----------------------------------------------------------------------------
|
| Here is where you define your SVG fill colors. By default we just provide
| `fill-current` which sets the fill to the current text color. This lets you
| specify a fill color using existing text color utilities and helps keep the
| generated CSS file size down.
|
| Class name: .fill-{name}
| CSS property: fill
|
*/
svgFill: {
'current': 'currentColor',
},
/*
|-----------------------------------------------------------------------------
| SVG stroke https://tailwindcss.com/docs/svg
|-----------------------------------------------------------------------------
|
| Here is where you define your SVG stroke colors. By default we just provide
| `stroke-current` which sets the stroke to the current text color. This lets
| you specify a stroke color using existing text color utilities and helps
| keep the generated CSS file size down.
|
| Class name: .stroke-{name}
| CSS property: stroke
|
*/
svgStroke: {
'current': 'currentColor',
},
/*
|-----------------------------------------------------------------------------
| Modules https://tailwindcss.com/docs/configuration#modules
|-----------------------------------------------------------------------------
|
| Here is where you control which modules are generated and what variants are
| generated for each of those modules.
|
| Currently supported variants:
| - responsive
| - hover
| - focus
| - focus-within
| - active
| - group-hover
|
| To disable a module completely, use `false` instead of an array.
|
*/
modules: {
appearance: ['responsive'],
backgroundAttachment: ['responsive'],
backgroundColors: ['responsive', 'hover', 'focus'],
backgroundPosition: ['responsive'],
backgroundRepeat: ['responsive'],
backgroundSize: ['responsive'],
borderCollapse: [],
borderColors: ['responsive', 'hover', 'focus'],
borderRadius: ['responsive'],
borderStyle: ['responsive'],
borderWidths: ['responsive'],
cursor: ['responsive'],
display: ['responsive'],
flexbox: ['responsive'],
float: ['responsive'],
fonts: ['responsive'],
fontWeights: ['responsive', 'hover', 'focus'],
height: ['responsive'],
leading: ['responsive'],
lists: ['responsive'],
margin: ['responsive'],
maxHeight: ['responsive'],
maxWidth: ['responsive'],
minHeight: ['responsive'],
minWidth: ['responsive'],
negativeMargin: ['responsive'],
objectFit: false,
objectPosition: false,
opacity: ['responsive'],
outline: ['focus'],
overflow: ['responsive'],
padding: ['responsive'],
pointerEvents: ['responsive'],
position: ['responsive'],
resize: ['responsive'],
shadows: ['responsive', 'hover', 'focus'],
svgFill: [],
svgStroke: [],
tableLayout: ['responsive'],
textAlign: ['responsive'],
textColors: ['responsive', 'hover', 'focus'],
textSizes: ['responsive'],
textStyle: ['responsive', 'hover', 'focus'],
tracking: ['responsive'],
userSelect: ['responsive'],
verticalAlign: ['responsive'],
visibility: ['responsive'],
whitespace: ['responsive'],
width: ['responsive'],
zIndex: ['responsive'],
},
/*
|-----------------------------------------------------------------------------
| Plugins https://tailwindcss.com/docs/plugins
|-----------------------------------------------------------------------------
|
| Here is where you can register any plugins you'd like to use in your
| project. Tailwind's built-in `container` plugin is enabled by default to
| give you a Bootstrap-style responsive container component out of the box.
|
| Be sure to view the complete plugin documentation to learn more about how
| the plugin system works.
|
*/
plugins: [
require('./plugins/container')({
// center: true,
// padding: '1rem',
}),
],
/*
|-----------------------------------------------------------------------------
| Advanced Options https://tailwindcss.com/docs/configuration#options
|-----------------------------------------------------------------------------
|
| Here is where you can tweak advanced configuration options. We recommend
| leaving these options alone unless you absolutely need to change them.
|
*/
options: {
prefix: '',
important: false,
separator: ':',
},
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment