0.5.1 • Published 4 years ago

tailwind-config-norska v0.5.1

Weekly downloads
4
License
MIT
Repository
github
Last release
4 years ago

tailwind-config-norska

This is the custom Tailwind config used by norska (my personal static website generator). I chose to expose the full config as its own npm module so I could more easily plug it into other projects that don't use norska.

Why a custom config?

I love Tailwind, but the default config wasn't enough for my needs, so I decided to tweak it until I was comfortable with it. This config suits my way of working really well, but it might not suits yours.

You can check https://projects.pixelastic.com/tailwind-config-norska/ to see all classes in action. This acts as both a documentation and a test suite for visual regression testing.

Generic changes

Separator

The separator has been changed from : to _ as I'm mostly working with pug templates and pug does not allow : in class names. That means that you would write md_w-3 and not md:w-3.

Spacing

Width, Height, Margin, Padding, Positioning and Borders all use the same scale. Some values might not make sense in a specific context, but I found that sharing the same scale would give more flexibility in how I could place things.

Simpler classes

Some classes have been simplified. The line-height classes are available through .lh-XXX instead of .leading-XXX. The .bold, .no-bold, .strike and .pointer have been added.

Text color and font family can be applied without prefixes: .red.arial will work.

PurgeCSS

This config will generate a lot of classes. It is expected that purgeCSS will be applied on the resulting HTML+CSS files to remove all unused CSS classes.

Custom classes

Gradients

Background gradient to be applied using the .bg-gradient-x (for horizontal gradient) and .bg-gradient-y (for vertical ones) classes. The start and end color will be taken from the .bg-gradient-from-XXX and .bg-gradient-to-XXX classes.

So .bg-gradient-x.bg-gradient-from-red.bg-gradient-to-green will generate and horizontal gradient from red to green. If only one color is defined, the other will fallback to transparent.

Bullets

As default list items don't have any bullets, a specific .bullet class can be used to prepend a to an element.

It also includes the .bullet-arrow (>), .bullet-cross (✗) and .bullet-tick (✓) variants, as well as numbered .bullet-1 through .bullet-10.

Bullet color can be changed with .bullet-XXX classes, where XXX is any configured color.

Debug

The .debug class is meant to be added to a parent element, and it will outline it as well as each of its nested children. Each depth will be outlined in a different color, allowing for quick identification of layout.

Flexbox

This weird-looking classes are meant to be used to quickly define flexbox context and element. Their naming is vim-inspired, meaning that each letter stands for the first letter of a defining part of what they do.

For example, .flrnw means Flex Row NoWrap, whil .flcw stands for Flex Column Wrap.

Some classes are meant to be used on containers (like .flrnw or .flc), while others should be used on children (like .fln or .fla). Of course, some children can also themselves become flexbox context so you can write .fln.flrnw (actually, I do that often).

The classes also come without the .fl prefix, for when you don't want to imply display: flex (maybe because the element is hidden and will be set to display flex only on a certain screen width).

Here is a recap of all the classes, explaining the idea behind them, and if they should be applied on a parent or children.

NameAcronymExplanationWhere
.flrnwFlex Row NoWrapRow context that does not allow wrappingParent
.flrwFlex Row WrapRow context that allows wrappingParent
.flcnwFlex Column NoWrapColumn content that does not allow wrappingParent
.flcwFlex Column WrapColumn content that allows wrappingParent
.rnwRow NoWrapSame as .flrnw, but without display: flexParent
.rwRow WrapSame as .flrw, but without display: flexParent
.cnwColumn NoWrapSame as .flcnw, but without display: flexParent
.cwColumn WrapSame as .flcw, but without display: flexParent
.flcFlex CenterCenter horizontally and vertically all children elementsParent
.flrchFlex Row Center HorizontallyCenter horizontally all elements of the rowParent
.flrcvFlex Row Center VerticallyCenter vertically all elements of the rowParent
.flcchFlex Column Center HorizontallyCenter horizontally all elements of the columnParent
.flccvFlex Column Center VerticallyCenter vertically all elements of the columnParent
.flralFlex Row Align LeftAlign all children elements on the left of the rowParent
.flrarFlex Row Align RightAlign all children elements on the right of the rowParent
.flcabFlex Column Align BottomAlign all children elements at the bottom of the columnParent
.flcatFlex Column Align TopAlign all children elements at the top of the columnParent
.flspaFlex Space AroundSet empty space around children elementsParent
.flspbFlex Space BetweenSet empty space between children elementsParent
.flaFlex autoElement takes all available spaceChildren
.flnFlex noneElement only takes as much place as neededChildren

Grayscale

The .grayscale class force and element to be displayed only in shades of black and white. It comes with .grayscale-1 and .grayscale-2 which are more or less strong. The default .grayscale is equal to .grayscale-1. A .grayscale-0 utility is also provided in case you need to overwrite it.

It internally uses a filter so might no work if other classes also define a filter on it.

Text Shadows

Shadows can be added to text using the .text-shadow class. Shadow color and opacity can be modified with any color and opacity defined (for example, .text-shadow-blue.text-shadow-opacity-50p will set the shadow to blue with an opacity of 50%).

Box Shadows

Shadows can be added to any block element using the .shadow-X classes. X is a size, ranging from 1 to 5. Sizes .shadow-01 and .shadow-001 are also availale for very subtle shadows and .shadow-0 to remove all shadow altogether.

Shadow color can be updated using .shadow-{color} classes, where {color} is any color defined earlier.

Transitions

Elements with a transition defined also have a default duration, delay and easing function defined. Those can still be overwritten with the relevant Tailwind classes.

Animations

Custom animations can be defined in the animationName theme. They are then available through the .animation-{name} classe. Delay, duration, easing, looping and state (running/paused) can be configured with classes.

Conditionals

The .if class and the .then_ modifier can be used to toggle property based on a page state. The .if should be applied to a checkbox or radio button, and whenever it is checked, the .then_ class will be applied to another element.

Combined with the default input/label relationship through id and for attributes, it is possible to use a label element to toggle a state using an invisible checkbox.

Example markup:

input.if#whatever(type="checkbox")
.hidden.then_block Hello!
label(for="whatever") Click me to toggle the content display

Theming

The default values of many parts have been updated. The following tables expose all the theme values. In includes both Tailwind default value, custom values, and new theming option added by custom plugins.

animationDelay

KeyValue
00s
11s
22s
55s
1010s
default0s
01100ms
02200ms
03300ms
05500ms
07700ms

animationDuration

KeyValue
00s
11s
22s
55s
1010s
1212s
3030s
4545s
6060s
default2s
01100ms
02200ms
03300ms
05500ms
07700ms

animationIterationCount

KeyValue
11
22
33
defaultinfinite

animationName

KeyValue
spin{"from":{"transform":"rotate(0deg)"},"to":{"transform":"rotate(360deg)"}}

animationPlayState

KeyValue
defaultrunning
pausedpaused
runningrunning

animationTimingFunction

KeyValue
defaultlinear
incubic-bezier(0.4, 0, 1, 1)
linearlinear
outcubic-bezier(0, 0, 0.2, 1)
in-outcubic-bezier(0.4, 0, 0.2, 1)

backgroundPosition

KeyValue
bottombottom
centercenter
leftleft
left-bottomleft bottom
left-topleft top
rightright
right-bottomright bottom
right-topright top
toptop

backgroundSize

KeyValue
autoauto
covercover
containcontain

borderRadius

KeyValue
00
1.125rem
2.25rem
3.5rem
41rem
default.25rem
full9999px
100p100%

borderWidth

KeyValue
00
11rem
21.25rem
31.5rem
42rem
52.5rem
63rem
74rem
85rem
96rem
108rem
1110rem
1212rem
1314rem
1416rem
1518rem
1620rem
1722rem
1824rem
1926rem
2028rem
0010.0625rem
0020.125rem
010.25rem
020.5rem
030.75rem
040.875rem

boxShadow

KeyValue
0none
10 1px 3px 0 rgba(var(--box-shadow-rgb), 0.1), 0 1px 2px 0 rgba(var(--box-shadow-rgb), 0.06)
20 4px 6px -1px rgba(var(--box-shadow-rgb), 0.1), 0 2px 4px -1px rgba(var(--box-shadow-rgb), 0.06)
30 10px 15px -3px rgba(var(--box-shadow-rgb), 0.1), 0 4px 6px -2px rgba(var(--box-shadow-rgb), 0.05)
40 20px 25px -5px rgba(var(--box-shadow-rgb), 0.1), 0 10px 10px -5px rgba(var(--box-shadow-rgb), 0.04)
50 25px 50px -12px rgba(var(--box-shadow-rgb), 0.25)
0010 0 0 1px rgba(var(--box-shadow-rgb), 0.05)
010 1px 2px 0 rgba(var(--box-shadow-rgb), 0.05)
default0 1px 3px 0 rgba(var(--box-shadow-rgb), 0.1), 0 1px 2px 0 rgba(var(--box-shadow-rgb), 0.06)
innerinset 0 2px 4px 0 rgba(var(--box-shadow-rgb), 0.06)
outline0 0 0 3px rgba(66, 153, 225, 0.5)

boxShadowColor

KeyValue
transparenttransparent
black#000
white#fff
gray#718096
gray-1#f7fafc
gray-2#edf2f7
gray-3#e2e8f0
gray-4#cbd5e0
gray-5#a0aec0
gray-6#718096
gray-7#4a5568
gray-8#2d3748
gray-9#1a202c
red#e53e3e
red-1#fff5f5
red-2#fed7d7
red-3#feb2b2
red-4#fc8181
red-5#f56565
red-6#e53e3e
red-7#c53030
red-8#9b2c2c
red-9#742a2a
orange#dd6b20
orange-1#fffaf0
orange-2#feebc8
orange-3#fbd38d
orange-4#ffaf00
orange-5#ed8936
orange-6#dd6b20
orange-7#c05621
orange-8#9c4221
orange-9#7b341e
yellow#d69e2e
yellow-1#fffff0
yellow-2#fefcbf
yellow-3#faf089
yellow-4#f6e05e
yellow-5#ecc94b
yellow-6#d69e2e
yellow-7#b7791f
yellow-8#975a16
yellow-9#744210
green#38a169
green-1#f0fff4
green-2#c6f6d5
green-3#9ae6b4
green-4#68d391
green-5#48bb78
green-6#38a169
green-7#2f855a
green-8#276749
green-9#22543d
teal#319795
teal-1#e6fffa
teal-2#b2f5ea
teal-3#81e6d9
teal-4#4fd1c5
teal-5#38b2ac
teal-6#319795
teal-7#2c7a7b
teal-8#285e61
teal-9#234e52
blue#3182ce
blue-1#ebf8ff
blue-2#bee3f8
blue-3#90cdf4
blue-4#63b3ed
blue-5#4299e1
blue-6#3182ce
blue-7#2b6cb0
blue-8#2c5282
blue-9#2a4365
indigo#5a67d8
indigo-1#ebf4ff
indigo-2#c3dafe
indigo-3#a3bffa
indigo-4#7f9cf5
indigo-5#667eea
indigo-6#5a67d8
indigo-7#4c51bf
indigo-8#434190
indigo-9#3c366b
purple#805ad5
purple-1#faf5ff
purple-2#e9d8fd
purple-3#d6bcfa
purple-4#b794f4
purple-5#9f7aea
purple-6#805ad5
purple-7#6b46c1
purple-8#553c9a
purple-9#44337a
pink#d53f8c
pink-1#fff5f7
pink-2#fed7e2
pink-3#fbb6ce
pink-4#f687b3
pink-5#ed64a6
pink-6#d53f8c
pink-7#b83280
pink-8#97266d
pink-9#702459
default#000

bullet

KeyValue
00.
11.
22.
33.
44.
55.
66.
77.
88.
99.
1010.
arrow>
cross
default
tick

bulletColor

KeyValue
transparenttransparent
black#000
white#fff
gray#718096
gray-1#f7fafc
gray-2#edf2f7
gray-3#e2e8f0
gray-4#cbd5e0
gray-5#a0aec0
gray-6#718096
gray-7#4a5568
gray-8#2d3748
gray-9#1a202c
red#e53e3e
red-1#fff5f5
red-2#fed7d7
red-3#feb2b2
red-4#fc8181
red-5#f56565
red-6#e53e3e
red-7#c53030
red-8#9b2c2c
red-9#742a2a
orange#dd6b20
orange-1#fffaf0
orange-2#feebc8
orange-3#fbd38d
orange-4#ffaf00
orange-5#ed8936
orange-6#dd6b20
orange-7#c05621
orange-8#9c4221
orange-9#7b341e
yellow#d69e2e
yellow-1#fffff0
yellow-2#fefcbf
yellow-3#faf089
yellow-4#f6e05e
yellow-5#ecc94b
yellow-6#d69e2e
yellow-7#b7791f
yellow-8#975a16
yellow-9#744210
green#38a169
green-1#f0fff4
green-2#c6f6d5
green-3#9ae6b4
green-4#68d391
green-5#48bb78
green-6#38a169
green-7#2f855a
green-8#276749
green-9#22543d
teal#319795
teal-1#e6fffa
teal-2#b2f5ea
teal-3#81e6d9
teal-4#4fd1c5
teal-5#38b2ac
teal-6#319795
teal-7#2c7a7b
teal-8#285e61
teal-9#234e52
blue#3182ce
blue-1#ebf8ff
blue-2#bee3f8
blue-3#90cdf4
blue-4#63b3ed
blue-5#4299e1
blue-6#3182ce
blue-7#2b6cb0
blue-8#2c5282
blue-9#2a4365
indigo#5a67d8
indigo-1#ebf4ff
indigo-2#c3dafe
indigo-3#a3bffa
indigo-4#7f9cf5
indigo-5#667eea
indigo-6#5a67d8
indigo-7#4c51bf
indigo-8#434190
indigo-9#3c366b
purple#805ad5
purple-1#faf5ff
purple-2#e9d8fd
purple-3#d6bcfa
purple-4#b794f4
purple-5#9f7aea
purple-6#805ad5
purple-7#6b46c1
purple-8#553c9a
purple-9#44337a
pink#d53f8c
pink-1#fff5f7
pink-2#fed7e2
pink-3#fbb6ce
pink-4#f687b3
pink-5#ed64a6
pink-6#d53f8c
pink-7#b83280
pink-8#97266d
pink-9#702459

colors

KeyValue
transparenttransparent
black#000
white#fff
gray#718096
gray-1#f7fafc
gray-2#edf2f7
gray-3#e2e8f0
gray-4#cbd5e0
gray-5#a0aec0
gray-6#718096
gray-7#4a5568
gray-8#2d3748
gray-9#1a202c
red#e53e3e
red-1#fff5f5
red-2#fed7d7
red-3#feb2b2
red-4#fc8181
red-5#f56565
red-6#e53e3e
red-7#c53030
red-8#9b2c2c
red-9#742a2a
orange#dd6b20
orange-1#fffaf0
orange-2#feebc8
orange-3#fbd38d
orange-4#ffaf00
orange-5#ed8936
orange-6#dd6b20
orange-7#c05621
orange-8#9c4221
orange-9#7b341e
yellow#d69e2e
yellow-1#fffff0
yellow-2#fefcbf
yellow-3#faf089
yellow-4#f6e05e
yellow-5#ecc94b
yellow-6#d69e2e
yellow-7#b7791f
yellow-8#975a16
yellow-9#744210
green#38a169
green-1#f0fff4
green-2#c6f6d5
green-3#9ae6b4
green-4#68d391
green-5#48bb78
green-6#38a169
green-7#2f855a
green-8#276749
green-9#22543d
teal#319795
teal-1#e6fffa
teal-2#b2f5ea
teal-3#81e6d9
teal-4#4fd1c5
teal-5#38b2ac
teal-6#319795
teal-7#2c7a7b
teal-8#285e61
teal-9#234e52
blue#3182ce
blue-1#ebf8ff
blue-2#bee3f8
blue-3#90cdf4
blue-4#63b3ed
blue-5#4299e1
blue-6#3182ce
blue-7#2b6cb0
blue-8#2c5282
blue-9#2a4365
indigo#5a67d8
indigo-1#ebf4ff
indigo-2#c3dafe
indigo-3#a3bffa
indigo-4#7f9cf5
indigo-5#667eea
indigo-6#5a67d8
indigo-7#4c51bf
indigo-8#434190
indigo-9#3c366b
purple#805ad5
purple-1#faf5ff
purple-2#e9d8fd
purple-3#d6bcfa
purple-4#b794f4
purple-5#9f7aea
purple-6#805ad5
purple-7#6b46c1
purple-8#553c9a
purple-9#44337a
pink#d53f8c
pink-1#fff5f7
pink-2#fed7e2
pink-3#fbb6ce
pink-4#f687b3
pink-5#ed64a6
pink-6#d53f8c
pink-7#b83280
pink-8#97266d
pink-9#702459

conditionals

KeyValue
ifthen

cursor

KeyValue
autoauto
defaultdefault
pointerpointer
waitwait
texttext
movemove
not-allowednot-allowed

debug

KeyValue
0#b794f4
1#f687b3
2#68d391
3#f6e05e
4#ffaf00
5#fc8181

dimensionBase

KeyValue
00
11rem
21.25rem
31.5rem
42rem
52.5rem
63rem
74rem
85rem
96rem
108rem
1110rem
1212rem
1314rem
1416rem
1518rem
1620rem
1722rem
1824rem
1926rem
2028rem
autoauto
0010.0625rem
0020.125rem
010.25rem
020.5rem
030.75rem
040.875rem
10p10%
20p20%
25p25%
30p30%
33pcalc(100% / 3)
40p40%
50p50%
60p60%
66pcalc(100% / 1.5)
70p70%
75p75%
80p80%
90p90%
100p100%
50vw50vw
50vh50vh
100vw100vw
100vh100vh

dimensionCrop

KeyValue
00
11rem
21.25rem
31.5rem
42rem
52.5rem
63rem
74rem
85rem
96rem
108rem
1110rem
1212rem
1314rem
1416rem
1518rem
1620rem
1722rem
1824rem
1926rem
2028rem
autoauto
0010.0625rem
0020.125rem
010.25rem
020.5rem
030.75rem
040.875rem
10p10%
20p20%
25p25%
30p30%
33pcalc(100% / 3)
40p40%
50p50%
60p60%
66pcalc(100% / 1.5)
70p70%
75p75%
80p80%
90p90%
100p100%
50vw50vw
50vh50vh
100vw100vw
100vh100vh

fill

KeyValue
currentcurrentColor

flex

KeyValue
11 1 0%
auto1 1 auto
initial0 1 auto
nonenone

flexGrow

KeyValue
00
default1

flexShrink

KeyValue
00
default1

flexbox

KeyValue
.flrnw{"display":"flex","flexDirection":"row"}
.flrw{"display":"flex","flexDirection":"row","flexWrap":"wrap"}
.flcnw{"display":"flex","flexDirection":"column"}
.flcw{"display":"flex","flexDirection":"column","flexWrap":"wrap"}
.rnw{"flexDirection":"row"}
.rw{"flexDirection":"row","flexWrap":"wrap"}
.cnw{"flexDirection":"column"}
.cw{"flexDirection":"column","flexWrap":"wrap"}
.flccv{"justifyContent":"center"}
.flcch{"alignItems":"center"}
.flrcv{"alignItems":"center"}
.flrch{"justifyContent":"center"}
.flc{"alignItems":"center","justifyContent":"center"}
.flral{"justifyContent":"flex-start"}
.flrar{"justifyContent":"flex-end"}
.flcat{"justifyContent":"flex-start"}
.flcab{"justifyContent":"flex-end"}
.flspa{"justifyContent":"space-around"}
.flspb{"justifyContent":"space-between"}
.fln{"flex":"none"}
.fla{"flex":"1 1 auto","minWidth":0,"minHeight":0}

fontFamily

KeyValue
sans"system-ui","-apple-system","BlinkMacSystemFont","\"Segoe UI\"","Roboto","\"Helvetica Neue\"","Arial","\"Noto Sans\"","sans-serif","\"Apple Color Emoji\"","\"Segoe UI Emoji\"","\"Segoe UI Symbol\"","\"Noto Color Emoji\""
serif"Georgia","Cambria","\"Times New Roman\"","Times","serif"
mono"Menlo","Monaco","Consolas","\"Liberation Mono\"","\"Courier New\"","monospace"
arial"Arial","\"Helvetica Neue\"","Helvetica","sans-serif"
verdana"Verdana","Geneva","sans-serif"
helvetica"\"Helvetica Neue\"","Helvetica","Arial","sans-serif"

fontSize

KeyValue
00rem
11rem
21.125rem
31.25rem
41.5rem
51.875rem
62.25rem
73rem
84rem
98rem
1012rem
000010.25rem
00010.5rem
0010.75rem
010.875rem
smaller0.75em
larger1.25em

fontWeight

KeyValue
.bold{"fontWeight":"bold"}
.no-bold{"fontWeight":"normal"}

gradientFrom

KeyValue
transparenttransparent
black#000
white#fff
gray#718096
gray-1#f7fafc
gray-2#edf2f7
gray-3#e2e8f0
gray-4#cbd5e0
gray-5#a0aec0
gray-6#718096
gray-7#4a5568
gray-8#2d3748
gray-9#1a202c
red#e53e3e
red-1#fff5f5
red-2#fed7d7
red-3#feb2b2
red-4#fc8181
red-5#f56565
red-6#e53e3e
red-7#c53030
red-8#9b2c2c
red-9#742a2a
orange#dd6b20
orange-1#fffaf0
orange-2#feebc8
orange-3#fbd38d
orange-4#ffaf00
orange-5#ed8936
orange-6#dd6b20
orange-7#c05621
orange-8#9c4221
orange-9#7b341e
yellow#d69e2e
yellow-1#fffff0
yellow-2#fefcbf
yellow-3#faf089
yellow-4#f6e05e
yellow-5#ecc94b
yellow-6#d69e2e
yellow-7#b7791f
yellow-8#975a16
yellow-9#744210
green#38a169
green-1#f0fff4
green-2#c6f6d5
green-3#9ae6b4
green-4#68d391
green-5#48bb78
green-6#38a169
green-7#2f855a
green-8#276749
green-9#22543d
teal#319795
teal-1#e6fffa
teal-2#b2f5ea
teal-3#81e6d9
teal-4#4fd1c5
teal-5#38b2ac
teal-6#319795
teal-7#2c7a7b
teal-8#285e61
teal-9#234e52
blue#3182ce
blue-1#ebf8ff
blue-2#bee3f8
blue-3#90cdf4
blue-4#63b3ed
blue-5#4299e1
blue-6#3182ce
blue-7#2b6cb0
blue-8#2c5282
blue-9#2a4365
indigo#5a67d8
indigo-1#ebf4ff
indigo-2#c3dafe
indigo-3#a3bffa
indigo-4#7f9cf5
indigo-5#667eea
indigo-6#5a67d8
indigo-7#4c51bf
indigo-8#434190
indigo-9#3c366b
purple#805ad5
purple-1#faf5ff
purple-2#e9d8fd
purple-3#d6bcfa
purple-4#b794f4
purple-5#9f7aea
purple-6#805ad5
purple-7#6b46c1
purple-8#553c9a
purple-9#44337a
pink#d53f8c
pink-1#fff5f7
pink-2#fed7e2
pink-3#fbb6ce
pink-4#f687b3
pink-5#ed64a6
pink-6#d53f8c
pink-7#b83280
pink-8#97266d
pink-9#702459
defaulttransparent

gradientTo

KeyValue
transparenttransparent
black#000
white#fff
gray#718096
gray-1#f7fafc
gray-2#edf2f7
gray-3#e2e8f0
gray-4#cbd5e0
gray-5#a0aec0
gray-6#718096
gray-7#4a5568
gray-8#2d3748
gray-9#1a202c
red#e53e3e
red-1#fff5f5
red-2#fed7d7
red-3#feb2b2
red-4#fc8181
red-5#f56565
red-6#e53e3e
red-7#c53030
red-8#9b2c2c
red-9#742a2a
orange#dd6b20
orange-1#fffaf0
orange-2#feebc8
orange-3#fbd38d
orange-4#ffaf00
orange-5#ed8936
orange-6#dd6b20
orange-7#c05621
orange-8#9c4221
orange-9#7b341e
yellow#d69e2e
yellow-1#fffff0
yellow-2#fefcbf
yellow-3#faf089
yellow-4#f6e05e
yellow-5#ecc94b
yellow-6#d69e2e
yellow-7#b7791f
yellow-8#975a16
yellow-9#744210
green#38a169
green-1#f0fff4
green-2#c6f6d5
green-3#9ae6b4
green-4#68d391
green-5#48bb78
green-6#38a169
green-7#2f855a
green-8#276749
green-9#22543d
teal#319795
teal-1#e6fffa
teal-2#b2f5ea
teal-3#81e6d9
teal-4#4fd1c5
teal-5#38b2ac
teal-6#319795
teal-7#2c7a7b
teal-8#285e61
teal-9#234e52
blue#3182ce
blue-1#ebf8ff
blue-2#bee3f8
blue-3#90cdf4
blue-4#63b3ed
blue-5#4299e1
blue-6#3182ce
blue-7#2b6cb0
blue-8#2c5282
blue-9#2a4365
indigo#5a67d8
indigo-1#ebf4ff
indigo-2#c3dafe
indigo-3#a3bffa
indigo-4#7f9cf5
indigo-5#667eea
indigo-6#5a67d8
indigo-7#4c51bf
indigo-8#434190
indigo-9#3c366b
purple#805ad5
purple-1#faf5ff
purple-2#e9d8fd
purple-3#d6bcfa
purple-4#b794f4
purple-5#9f7aea
purple-6#805ad5
purple-7#6b46c1
purple-8#553c9a
purple-9#44337a
pink#d53f8c
pink-1#fff5f7
pink-2#fed7e2
pink-3#fbb6ce
pink-4#f687b3
pink-5#ed64a6
pink-6#d53f8c
pink-7#b83280
pink-8#97266d
pink-9#702459
defaulttransparent

grayscale

KeyValue
00
10p.1
25p.25
50p.5
75p.75
90p.9
100p1
default1

gridColumn

KeyValue
autoauto
span-1span 1 / span 1
span-2span 2 / span 2
span-3span 3 / span 3
span-4span 4 / span 4
span-5span 5 / span 5
span-6span 6 / span 6
span-7span 7 / span 7
span-8span 8 / span 8
span-9span 9 / span 9
span-10span 10 / span 10
span-11span 11 / span 11
span-12span 12 / span 12

gridColumnEnd

KeyValue
11
22
33
44
55
66
77
88
99
1010
1111
1212
1313
autoauto

gridColumnStart

KeyValue
11
22
33
44
55
66
77
88
99
1010
1111
1212
1313
autoauto

gridColumnWidth

KeyValue
0repeat(auto-fill, minmax(0, 1fr))
1repeat(auto-fill, minmax(1rem, 1fr))
2repeat(auto-fill, minmax(1.25rem, 1fr))
3repeat(auto-fill, minmax(1.5rem, 1fr))
4repeat(auto-fill, minmax(2rem, 1fr))
5repeat(auto-fill, minmax(2.5rem, 1fr))
6repeat(auto-fill, minmax(3rem, 1fr))
7repeat(auto-fill, minmax(4rem, 1fr))
8repeat(auto-fill, minmax(5rem, 1fr))
9repeat(auto-fill, minmax(6rem, 1fr))
10repeat(auto-fill, minmax(8rem, 1fr))
11repeat(auto-fill, minmax(10rem, 1fr))
12repeat(auto-fill, minmax(12rem, 1fr))
13repeat(auto-fill, minmax(14rem, 1fr))
14repeat(auto-fill, minmax(16rem, 1fr))
15repeat(auto-fill, minmax(18rem, 1fr))
16repeat(auto-fill, minmax(20rem, 1fr))
17repeat(auto-fill, minmax(22rem, 1fr))
18repeat(auto-fill, minmax(24rem, 1fr))
19repeat(auto-fill, minmax(26rem, 1fr))
20repeat(auto-fill, minmax(28rem, 1fr))
autorepeat(auto-fill, minmax(auto, 1fr))
001repeat(auto-fill, minmax(0.0625rem, 1fr))
002repeat(auto-fill, minmax(0.125rem, 1fr))
01repeat(auto-fill, minmax(0.25rem, 1fr))
02repeat(auto-fill, minmax(0.5rem, 1fr))
03repeat(auto-fill, minmax(0.75rem, 1fr))
04repeat(auto-fill, minmax(0.875rem, 1fr))
50vwrepeat(auto-fill, minmax(50vw, 1fr))
50vhrepeat(auto-fill, minmax(50vh, 1fr))
100vwrepeat(auto-fill, minmax(100vw, 1fr))
100vhrepeat(auto-fill, minmax(100vh, 1fr))
25chrepeat(auto-fill, minmax(25ch, 1fr))
50chrepeat(auto-fill, minmax(50ch, 1fr))
65chrepeat(auto-fill, minmax(65ch, 1fr))
75chrepeat(auto-fill, minmax(75ch, 1fr))
100chrepeat(auto-fill, minmax(100ch, 1fr))
proserepeat(auto-fill, minmax(65ch, 1fr))

gridRow

KeyValue
autoauto
span-1span 1 / span 1
span-2span 2 / span 2
span-3span 3 / span 3
span-4span 4 / span 4
span-5span 5 / span 5
span-6span 6 / span 6

gridRowEnd

KeyValue
11
22
33
44
55
66
77
autoauto

gridRowStart

KeyValue
11
22
33
44
55
66
77
autoauto

gridTemplateColumns

KeyValue
1repeat(1, minmax(0, 1fr))
2repeat(2, minmax(0, 1fr))
3repeat(3, minmax(0, 1fr))
4repeat(4, minmax(0, 1fr))
5repeat(5, minmax(0, 1fr))
6repeat(6, minmax(0, 1fr))
7repeat(7, minmax(0, 1fr))
8repeat(8, minmax(0, 1fr))
9repeat(9, minmax(0, 1fr))
10repeat(10, minmax(0, 1fr))
11repeat(11, minmax(0, 1fr))
12repeat(12, minmax(0, 1fr))
nonenone

gridTemplateRows

KeyValue
1repeat(1, minmax(0, 1fr))
2repeat(2, minmax(0, 1fr))
3repeat(3, minmax(0, 1fr))
4repeat(4, minmax(0, 1fr))
5repeat(5, minmax(0, 1fr))
6repeat(6, minmax(0, 1fr))
nonenone

height

KeyValue
00
11rem
21.25rem
31.5rem
42rem
52.5rem
63rem
74rem
85rem
96rem
108rem
1110rem
1212rem
1314rem
1416rem
1518rem
1620rem
1722rem
1824rem
1926rem
2028rem
autoauto
0010.0625rem
0020.125rem
010.25rem
020.5rem
030.75rem
040.875rem
10p10%
20p20%
25p25%
30p30%
33pcalc(100% / 3)
40p40%
50p50%
60p60%
66pcalc(100% / 1.5)
70p70%
75p75%
80p80%
90p90%
100p100%
50vw50vw
50vh50vh
100vw100vw
100vh100vh

inset

KeyValue
00
11rem
21.25rem
31.5rem
42rem
52.5rem
63rem
74rem
85rem
96rem
108rem
1110rem
1212rem
1314rem
1416rem
1518rem
1620rem
1722rem
1824rem
1926rem
2028rem
autoauto
0010.0625rem
0020.125rem
010.25rem
020.5rem
030.75rem
040.875rem
10p10%
20p20%
25p25%
30p30%
33pcalc(100% / 3)
40p40%
50p50%
60p60%
66pcalc(100% / 1.5)
70p70%
75p75%
80p80%
90p90%
100p100%
50vw50vw
50vh50vh
100vw100vw
100vh100vh
-0-0
-1-1rem
-2-1.25rem
-3-1.5rem
-4-2rem
-5-2.5rem
-6-3rem
-7-4rem
-8-5rem
-9-6rem
-10-8rem
-11-10rem
-12-12rem
-13-14rem
-14-16rem
-15-18rem
-16-20rem
-17-22rem
-18-24rem
-19-26rem
-20-28rem
-auto-auto
-001-0.0625rem
-002-0.125rem
-01-0.25rem
-02-0.5rem
-03-0.75rem
-04-0.875rem
-10p-10%
-20p-20%
-25p-25%
-30p-30%
-33p-calc(100% / 3)
-40p-40%
-50p-50%
-60p-60%
-66p-calc(100% / 1.5)
-70p-70%
-75p-75%
-80p-80%
-90p-90%
-100p-100%
-50vw-50vw
-50vh-50vh
-100vw-100vw
-100vh-100vh

letterSpacing

KeyValue
tighter-0.05em
tight-0.025em
normal0
wide0.025em
wider0.05em
widest0.1em

lineHeight

KeyValue
00
11
21.25
31.375
41.5
51.625
62
tight1.25
normal1.5
loose2

listStyleType

KeyValue
nonenone
discdisc
decimaldecimal

maxHeight

KeyValue
00
11rem
21.25rem
31.5rem
42rem
52.5rem
63rem
74rem
85rem
96rem
108rem
1110rem
1212rem
1314rem
1416rem
1518rem
1620rem
1722rem
1824rem
1926rem
2028rem
autoauto
0010.0625rem
0020.125rem
010.25rem
020.5rem
030.75rem
040.875rem
10p10%
20p20%
25p25%
30p30%
33pcalc(100% / 3)
40p40%
50p50%
60p60%
66pcalc(100% / 1.5)
70p70%
75p75%
80p80%
90p90%
100p100%
50vw50vw
50vh50vh
100vw100vw
100vh100vh
nonenone

maxWidth

KeyValue
00
11rem
21.25rem
31.5rem
42rem
52.5rem
63rem
74rem
85rem
96rem
108rem
1110rem
1212rem
1314rem
1416rem
1518rem
1620rem
1722rem
1824rem
1926rem
2028rem
autoauto
0010.0625rem
0020.125rem
010.25rem
020.5rem
030.75rem
040.875rem
10p10%
20p20%
25p25%
30p30%
33pcalc(100% / 3)
40p40%
50p50%
60p60%
66pcalc(100% / 1.5)
70p70%
75p75%
80p80%
90p90%
100p100%
50vw50vw
50vh50vh
100vw100vw
100vh100vh
25ch25ch
50ch50ch
65ch65ch
75ch75ch
100ch100ch
prose65ch
nonenone

minHeight

KeyValue
00
11rem
21.25rem
31.5rem
42rem
52.5rem
63rem
74rem
85rem
96rem
108rem
1110rem
1212rem
1314rem
1416rem
1518rem
1620rem
1722rem
1824rem
1926rem
2028rem
autoauto
0010.0625rem
0020.125rem
010.25rem
020.5rem
030.75rem
040.875rem
10p10%
20p20%
25p25%
30p30%
33pcalc(100% / 3)
40p40%
50p50%
60p60%
66pcalc(100% / 1.5)
70p70%
75p75%
80p80%
90p90%
100p100%
50vw50vw
50vh50vh
100vw100vw
100vh100vh

minWidth

KeyValue
00
11rem
21.25rem
31.5rem
42rem
52.5rem
63rem
74rem
85rem
96rem
108rem
1110rem
1212rem
1314rem
1416rem
1518rem
1620rem
1722rem
1824rem
1926rem
2028rem
autoauto
0010.0625rem
0020.125rem
010.25rem
020.5rem
030.75rem
040.875rem
10p10%
20p20%
25p25%
30p30%
33pcalc(100% / 3)
40p40%
50p50%
60p60%
66pcalc(100% / 1.5)
70p70%
75p75%
80p80%
90p90%
100p100%
50vw50vw
50vh50vh
100vw100vw
100vh100vh

misc

KeyValue
.pointer{"cursor":"pointer"}

objectPosition

KeyValue
bottombottom
centercenter
leftleft
left-bottomleft bottom
left-topleft top
rightright
right-bottomright bottom
right-topright top
toptop

opacity

KeyValue
00
10p.1
25p.25
50p.5
75p.75
90p.9
100p1

order

KeyValue
11
22
33
44
55
66
77
88
99
1010
1111
1212
first-9999
last9999
none0

rotate

KeyValue
00
4545deg
9090deg
180180deg
-180-180deg
-90-90deg
-45-45deg

scale

KeyValue
0p0
50p.5
75p.75
90p.9
95p.95
100p1
105p1.05
110p1.1
125p1.25
150p1.5

screens

KeyValue
sm640px
md768px
lg1024px
xl1280px

skew

KeyValue
00
33deg
66deg
1212deg
-12-12deg
-6-6deg
-3-3deg

spacing

KeyValue
00
11rem
21.25rem
31.5rem
42rem
52.5rem
63rem
74rem
85rem
96rem
108rem
1110rem
1212rem
1314rem
1416rem
1518rem
1620rem
1722rem
1824rem
1926rem
2028rem
autoauto
0010.0625rem
0020.125rem
010.25rem
020.5rem
030.75rem
040.875rem
10p10%
20p20%
25p25%
30p30%
33pcalc(100% / 3)
40p40%
50p50%
60p60%
66pcalc(100% / 1.5)
70p70%
75p75%
80p80%
90p90%
100p100%
50vw50vw
50vh50vh
100vw100vw
100vh100vh

stroke

KeyValue
currentcurrentColor

strokeWidth

KeyValue
00
11
22

textColor

KeyValue
transparenttransparent
black#000
white#fff
gray#718096
gray-1#f7fafc
gray-2#edf2f7
gray-3#e2e8f0
gray-4#cbd5e0
gray-5#a0aec0
gray-6#718096
gray-7#4a5568
gray-8#2d3748
gray-9#1a202c
red#e53e3e
red-1#fff5f5
red-2#fed7d7
red-3#feb2b2
red-4#fc8181
red-5#f56565
red-6#e53e3e
red-7#c53030
red-8#9b2c2c
red-9#742a2a
orange#dd6b20
orange-1#fffaf0
orange-2#feebc8
orange-3#fbd38d
orange-4#ffaf00
orange-5#ed8936
orange-6#dd6b20
orange-7#c05621
orange-8#9c4221
orange-9#7b341e
yellow#d69e2e
yellow-1#fffff0
yellow-2#fefcbf
yellow-3#faf089
yellow-4#f6e05e
yellow-5#ecc94b
yellow-6#d69e2e
yellow-7#b7791f
yellow-8#975a16
yellow-9#744210
green#38a169
green-1#f0fff4
green-2#c6f6d5
green-3#9ae6b4
green-4#68d391
green-5#48bb78
green-6#38a169
green-7#2f855a
green-8#276749
green-9#22543d
teal#319795
teal-1#e6fffa
teal-2#b2f5ea
teal-3#81e6d9
teal-4#4fd1c5
teal-5#38b2ac
teal-6#319795
teal-7#2c7a7b
teal-8#285e61
teal-9#234e52
blue#3182ce
blue-1#ebf8ff
blue-2#bee3f8
blue-3#90cdf4
blue-4#63b3ed
blue-5#4299e1
blue-6#3182ce
blue-7#2b6cb0
blue-8#2c5282
blue-9#2a4365
indigo#5a67d8
indigo-1#ebf4ff
indigo-2#c3dafe
indigo-3#a3bffa
indigo-4#7f9cf5
indigo-5#667eea
indigo-6#5a67d8
indigo-7#4c51bf
indigo-8#434190
indigo-9#3c366b
purple#805ad5
purple-1#faf5ff
purple-2#e9d8fd
purple-3#d6bcfa
purple-4#b794f4
purple-5#9f7aea
purple-6#805ad5
purple-7#6b46c1
purple-8#553c9a
purple-9#44337a
pink#d53f8c
pink-1#fff5f7
pink-2#fed7e2
pink-3#fbb6ce
pink-4#f687b3
pink-5#ed64a6
pink-6#d53f8c
pink-7#b83280
pink-8#97266d
pink-9#702459

textDecoration

KeyValue
nonenone
strikeline-through
underlineunderline

textDecorationColor

KeyValue
transparenttransparent
black#000
white#fff
gray#718096
gray-1#f7fafc
gray-2#edf2f7
gray-3#e2e8f0
gray-4#cbd5e0
gray-5#a0aec0
gray-6#718096
gray-7#4a5568
gray-8#2d3748
gray-9#1a202c
red#e53e3e
red-1#fff5f5
red-2#fed7d7
red-3#feb2b2
red-4#fc8181
red-5#f56565
red-6#e53e3e
red-7#c53030
red-8#9b2c2c
red-9#742a2a
orange#dd6b20
orange-1#fffaf0
orange-2#feebc8
orange-3#fbd38d
orange-4#ffaf00
orange-5#ed8936
orange-6#dd6b20
orange-7#c05621
orange-8#9c4221
orange-9#7b341e
yellow#d69e2e
yellow-1#fffff0
yellow-2#fefcbf
yellow-3#faf089
yellow-4#f6e05e
yellow-5#ecc94b
yellow-6#d69e2e
yellow-7#b7791f
yellow-8#975a16
yellow-9#744210
green#38a169
green-1#f0fff4
green-2#c6f6d5
green-3#9ae6b4
green-4#68d391
green-5#48bb78
green-6#38a169
green-7#2f855a
green-8#276749
green-9#22543d
teal#319795
teal-1#e6fffa
teal-2#b2f5ea
teal-3#81e6d9
teal-4#4fd1c5
teal-5#38b2ac
teal-6#319795
teal-7#2c7a7b
teal-8#285e61
teal-9#234e52
blue#3182ce
blue-1#ebf8ff
blue-2#bee3f8
blue-3#90cdf4
blue-4#63b3ed
blue-5#4299e1
blue-6#3182ce
blue-7#2b6cb0
blue-8#2c5282
blue-9#2a4365
indigo#5a67d8
indigo-1#ebf4ff
indigo-2#c3dafe
indigo-3#a3bffa
indigo-4#7f9cf5
indigo-5#667eea
indigo-6#5a67d8
indigo-7#4c51bf
indigo-8#434190
indigo-9#3c366b
purple#805ad5
purple-1#faf5ff
purple-2#e9d8fd
purple-3#d6bcfa
purple-4#b794f4
purple-5#9f7aea
purple-6#805ad5
purple-7#6b46c1
purple-8#553c9a
purple-9#44337a
pink#d53f8c
pink-1#fff5f7
pink-2#fed7e2
pink-3#fbb6ce
pink-4#f687b3
pink-5#ed64a6
pink-6#d53f8c
pink-7#b83280
pink-8#97266d
pink-9#702459
defaultcurrentColor

textOpacity

KeyValue
00
10p.1
25p.25
50p.5
75p.75
90p.9
100p1
default1

textShadow

KeyValue
default.03em .03em rgba(var(--text-shadow-rgb), var(--text-shadow-opacity))

textShadowColor

KeyValue
transparenttransparent
black#000
white#fff
gray#718096
gray-1#f7fafc
gray-2#edf2f7
gray-3#e2e8f0
gray-4#cbd5e0
gray-5#a0aec0
gray-6#718096
gray-7#4a5568
gray-8#2d3748
gray-9#1a202c
red#e53e3e
red-1#fff5f5
red-2#fed7d7
red-3#feb2b2
red-4#fc8181
red-5#f56565
red-6#e53e3e
red-7#c53030
red-8#9b2c2c
red-9#742a2a
orange#dd6b20
orange-1#fffaf0
orange-2#feebc8
orange-3#fbd38d
orange-4#ffaf00
orange-5#ed8936
orange-6#dd6b20
orange-7#c05621
orange-8#9c4221
orange-9#7b341e
yellow#d69e2e
yellow-1#fffff0
yellow-2#fefcbf
yellow-3#faf089
yellow-4#f6e05e
yellow-5#ecc94b
yellow-6#d69e2e
yellow-7#b7791f
yellow-8#975a16
yellow-9#744210
green#38a169
green-1#f0fff4
green-2#c6f6d5
green-3#9ae6b4
green-4#68d391
green-5#48bb78
green-6#38a169
green-7#2f855a
green-8#276749
green-9#22543d
teal#319795
teal-1#e6fffa
teal-2#b2f5ea
teal-3#81e6d9
teal-4#4fd1c5
teal-5#38b2ac
teal-6#319795
teal-7#2c7a7b
teal-8#285e61
teal-9#234e52
blue#3182ce
blue-1#ebf8ff
blue-2#bee3f8
blue-3#90cdf4
blue-4#63b3ed
blue-5#4299e1
blue-6#3182ce
blue-7#2b6cb0
blue-8#2c5282
blue-9#2a4365
indigo#5a67d8
indigo-1#ebf4ff
indigo-2#c3dafe
indigo-3#a3bffa
indigo-4#7f9cf5
indigo-5#667eea
indigo-6#5a67d8
indigo-7#4c51bf
indigo-8#434190
indigo-9#3c366b
purple#805ad5
purple-1#faf5ff
purple-2#e9d8fd
purple-3#d6bcfa
purple-4#b794f4
purple-5#9f7aea
purple-6#805ad5
purple-7#6b46c1
purple-8#553c9a
purple-9#44337a
pink#d53f8c
pink-1#fff5f7
pink-2#fed7e2
pink-3#fbb6ce
pink-4#f687b3
pink-5#ed64a6
pink-6#d53f8c
pink-7#b83280
pink-8#97266d
pink-9#702459
default#000

textShadowOpacity

KeyValue
00
10p.1
25p.25
50p.5
75p.75
90p.9
100p1
default.75

transformOrigin

KeyValue
centercenter
toptop
top-righttop right
rightright
bottom-rightbottom right
bottombottom
bottom-leftbottom left
leftleft
top-lefttop left

transitionDelay

KeyValue
00s
11s
22s
55s
1010s
default0s
01100ms
02200ms
03300ms
05500ms
07700ms

transitionDuration

KeyValue
00s
11s
22s
55s
1010s
1212s
3030s
4545s
6060s
default500ms
01100ms
02200ms
03300ms
05500ms
07700ms

transitionProperty

KeyValue
nonenone
allall
colorsbackground-color, border-color, color, fill, stroke, text-decoration-color
dimensionsmin-height, height, max-height, min-width, width, max-width
opacityopacity
shadowbox-shadow, text-shadow
transformtransform

transitionTimingFunction

KeyValue
defaultcubic-bezier(0.4, 0, 0.2, 1)
incubic-bezier(0.4, 0, 1, 1)
linearlinear
outcubic-bezier(0, 0, 0.2, 1)
in-outcubic-bezier(0.4, 0, 0.2, 1)

width

KeyValue
00
11rem
21.25rem
31.5rem
42rem
52.5rem
63rem
74rem
85rem
96rem
108rem
1110rem
1212rem
1314rem
1416rem
1518rem
1620rem
1722rem
1824rem
1926rem
2028rem
autoauto
0010.0625rem
0020.125rem
010.25rem
020.5rem
030.75rem
040.875rem
10p10%
20p20%
25p25%
30p30%
33pcalc(100% / 3)
40p40%
50p50%
60p60%
66pcalc(100% / 1.5)
70p70%
75p75%
80p80%
90p90%
100p100%
50vw50vw
50vh50vh
100vw100vw
100vh100vh
25ch25ch
50ch50ch
65ch65ch
75ch75ch
100ch100ch
prose65ch

zIndex

KeyValue
00
11
22
33
44
55
66
77
88
99

Variants

The following variants are updated compared to the default Tailwind config.

TypeVariants
backgroundColorresponsive, hover, focus, focus-within, conditionals
backgroundOpacityresponsive, hover, focus, focus-within
displayresponsive, hover, focus, conditionals
heightresponsive, hover
positionresponsive, hover
widthresponsive, hover
zIndexresponsive, hover
animationAndTransitionhover, focus
boxShadowresponsive, hover, focus
opacityresponsive, hover, focus, focus-within, conditionals
flexboxresponsive
grayscalehover, focus, focus-within
lineHeightresponsive
miscresponsive, hover, focus
textColorresponsive, hover, focus, focus-within, conditionals
textDecorationresponsive, hover, focus

Contribution

The ./docs folder contains a test website that includes all the new classes. You can run it with yarn run docs:serve.

Once the documentation website is served locally, you can run visual regression tests with the yarn run test:visual command. It will take screenshots of each page and compare them to reference screenshot taken earlier.

If there is any difference, a visual diff will be presented. If the changes are expected (ie. you added a new feature or fixed a bug), run yarn run test:visual:approve to update the reference screenshots.

Note that only the element with the .screenshot class will be compared. You can add the .screenshot-click class on elements if you want to click on them before the screenshot. Similarly you can add the .screenshot-hover element on one element if you want to hover it before taking a screenshot. Note that only one element can be hovered, but several elements can be clicked.

0.5.1

4 years ago

0.5.0

4 years ago

0.4.2

4 years ago

0.4.1

4 years ago

0.4.0

4 years ago

0.3.1

4 years ago

0.3.0

4 years ago

0.2.5

4 years ago

0.2.4

4 years ago

0.2.3

4 years ago

0.2.2

4 years ago

0.2.1

4 years ago

0.2.0

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago

0.0.14

4 years ago

0.0.13

4 years ago

0.0.12

4 years ago

0.0.11

4 years ago

0.0.10

4 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.5

4 years ago

0.0.3

5 years ago

0.0.4

4 years ago

0.0.2

5 years ago