167 Commits

Author SHA1 Message Date
Adam Wathan
43ea7311d5
Merge pull request #697 from tailwindcss/rename-config-to-theme
Remove config() function in favor of theme()
2019-03-05 09:42:58 -05:00
Adam Wathan
9b07984144 Support nested object for borderColor plugin 2019-03-04 13:10:34 -05:00
Adam Wathan
bfde7e4d6e Support nested object for textColor plugin 2019-03-04 13:09:35 -05:00
Adam Wathan
c3c9cdf5d6 Support nested object for backgroundColor plugin 2019-03-04 13:05:18 -05:00
Adam Wathan
fb451e7aa6 Update font-size and font-weight to inherit 2019-03-02 13:05:39 -05:00
Adam Wathan
c3886066cc Reset heading styles in preflight
Set all headings to inherit the parent font size and reset the font
weight to normal. This prevents you from accidentally using browser
default sizes in your designs and deviating from your design system.
2019-03-01 20:53:01 -05:00
Adam Wathan
7482ed55d1 Make flex-* utilities customizable 2019-03-01 13:46:53 -05:00
Adam Wathan
cd64304d7b Merge branch 'master' into next 2019-03-01 09:07:15 -05:00
Adam Wathan
a7a95b15c8 Escape tracking class names 2019-03-01 09:06:58 -05:00
Adam Wathan
53ca284553 Remove config() function in favor of theme()
The only reason the config() helper function existed was to access your design tokens in your CSS, like:

```css
.foo {
  color: config('colors.blue')
}
```

Now that design tokens are nested in the new `theme` section, using the `config()` function is a bit more verbose:

```css
.foo {
  color: config('theme.colors.blue')
}
```

This PR removes the `config()` function in favor of a new `theme()` function that is already scoped to the `theme` section of the config:

```css
.foo {
  color: theme('colors.blue')
}
```

I can't think of any reason at all why you would need to access the non-theme values in your config from your CSS (like enabled variants, or your list of plugins), and the word `theme` is much more expressive than `config`, so I think this is a worthwhile change.
2019-03-01 08:35:24 -05:00
Adam Wathan
928bc549dd Source zIndex options from config 2019-02-28 14:22:52 -05:00
Adam Wathan
51b2d05506 Source width options from config 2019-02-28 12:39:17 -05:00
Adam Wathan
a9d9492ff9 Source whitespace options from config 2019-02-28 12:38:51 -05:00
Adam Wathan
340628f217 Source visibility options from config 2019-02-28 12:38:23 -05:00
Adam Wathan
bcdbcaaf4e Source verticalAlign options from config 2019-02-28 12:38:06 -05:00
Adam Wathan
7e848e71e4 Source userSelect options from config 2019-02-28 12:37:47 -05:00
Adam Wathan
0c633b8e89 Source textTransform options from config 2019-02-28 12:37:37 -05:00
Adam Wathan
64ac57f6e7 Source textDecoration options from config 2019-02-28 12:36:37 -05:00
Adam Wathan
467d810e58 Source textColor options from config 2019-02-28 12:36:18 -05:00
Adam Wathan
dc57496674 Source textAlign options from config 2019-02-28 12:35:48 -05:00
Adam Wathan
ecfdf48aef Source tableLayout options from config 2019-02-28 12:35:29 -05:00
Adam Wathan
1db5983058 Source stroke options from config 2019-02-28 12:33:59 -05:00
Adam Wathan
940043d9b8 Source resize options from config 2019-02-28 12:33:33 -05:00
Adam Wathan
462530fad2 Source position options from config 2019-02-28 12:33:10 -05:00
Adam Wathan
64c026f2e0 Source pointerEvents options from config 2019-02-28 12:32:37 -05:00
Adam Wathan
eea9c9ab75 Source padding options from config 2019-02-28 12:32:13 -05:00
Adam Wathan
3494cf509f Source overflow options from config 2019-02-28 12:25:04 -05:00
Adam Wathan
f323a546bd Source outline options from config 2019-02-28 12:24:53 -05:00
Adam Wathan
4e1774254e Source opacity options from config 2019-02-28 12:22:24 -05:00
Adam Wathan
1a2b5652c1 Source objectPosition options from config 2019-02-28 12:21:56 -05:00
Adam Wathan
3c5fad4fb4 Source objectFit options from config 2019-02-28 12:21:22 -05:00
Adam Wathan
7c409e2f4b Source negativeMargin options from config 2019-02-28 12:20:39 -05:00
Adam Wathan
8f6a69f458 Source minWidth options from config 2019-02-28 12:19:07 -05:00
Adam Wathan
55d8b694e3 Source minHeight options from config 2019-02-28 12:15:40 -05:00
Adam Wathan
aeb37c7e76 Source maxWidth options from config 2019-02-28 12:06:59 -05:00
Adam Wathan
3c0af9ecb8 Source maxHeight options from config 2019-02-28 12:06:32 -05:00
Adam Wathan
e23dc23c0c Source margin options from config 2019-02-28 12:05:36 -05:00
Adam Wathan
7d6a0220fa Source listStyle options from config 2019-02-28 12:05:12 -05:00
Adam Wathan
00f72f6393 Source lineHeight options from config 2019-02-28 12:03:56 -05:00
Adam Wathan
9179c8aa36 Source letterSpacing options from config 2019-02-28 12:02:19 -05:00
Adam Wathan
ebcd4b0bfe Source justifyContent options from config 2019-02-28 12:01:29 -05:00
Adam Wathan
1637e94367 Source height options from config 2019-02-28 12:01:04 -05:00
Adam Wathan
f51542fd91 Source fontWeight options from config 2019-02-28 12:00:22 -05:00
Adam Wathan
bef8775818 Source fontStyle options from config 2019-02-28 11:59:54 -05:00
Adam Wathan
90e28a087a Source fontSmoothing options from config 2019-02-28 11:59:37 -05:00
Adam Wathan
db0a283dea Source fontSize options from config 2019-02-28 11:59:17 -05:00
Adam Wathan
444236c427 Source fontFamily options from config 2019-02-28 11:58:49 -05:00
Adam Wathan
1f7f9e394e Source float options from config 2019-02-28 11:58:21 -05:00
Adam Wathan
5504bd1360 Source flexWrap options from config 2019-02-28 11:57:07 -05:00
Adam Wathan
b850ba2885 Source flexShrink options from config 2019-02-28 11:56:46 -05:00