No description
Find a file
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
.github Remove component example reference from contributing guide 2018-09-22 15:30:53 -04:00
__tests__ Remove config() function in favor of theme() 2019-03-01 08:35:24 -05:00
dist Add empty .npmignore so dist files are distributed with releases 2017-11-09 09:21:30 -05:00
jest Fix tests and style 2017-11-23 09:58:25 -05:00
plugins Don't export core plugins 2019-02-26 09:59:50 -05:00
src Remove config() function in favor of theme() 2019-03-01 08:35:24 -05:00
.editorconfig Convert new stuff to use ES6 modules 2017-08-27 18:02:41 -04:00
.eslintignore Added tests for CLI utils 2018-09-25 11:09:20 -05:00
.eslintrc Support for basic variant generator plugins 2018-06-26 13:44:47 -04:00
.gitignore Ignore index.html 2019-02-27 13:31:13 -05:00
.npmignore Remove docs from main repo 2018-02-24 08:12:55 -05:00
.travis.yml chore: tests Node.js 8 and 10, remove PHP in CI config 2018-05-29 00:13:17 +02:00
base.css Remove preflight CSS export in favor of base 2019-02-11 12:38:46 -05:00
components.css Move CSS files to root for easier imports 2018-03-13 10:05:24 -04:00
defaultConfig.js Switch to separate config import 2017-11-14 08:03:31 -05:00
defaultConfig.stub.js Split flexShrink to separate plugin 2019-02-26 10:33:34 -05:00
defaultTheme.js Update shadows to incorporate progressive negative spread 2019-02-28 07:46:26 -05:00
LICENSE Avoid updating license every year 2017-12-29 22:32:43 +01:00
package-lock.json Depend on normalize.css properly 2019-02-11 15:49:12 -05:00
package.json Remove dependency on cssesc 2019-02-27 16:40:19 -05:00
README.md Switch Slack to Discord in README 2019-02-14 08:51:33 -05:00
tailwind.css Convert preflight to plugin 2019-02-07 15:19:54 -05:00
utilities.css Move CSS files to root for easier imports 2018-03-13 10:05:24 -04:00
yarn.lock Switch from css.escape to cssesc 2019-02-27 13:53:28 -05:00


A utility-first CSS framework for rapidly building custom user interfaces.

Build Status Total Downloads Latest Release License


Documentation

For full documentation, visit tailwindcss.com.

Community

For help, discussion about best practices, or any other conversation that would benefit from being searchable:

Discuss Tailwind CSS on GitHub

For casual chit-chat with others using the framework:

Join the Tailwind CSS Discord Server

Contributing

If you're interested in contributing to Tailwind CSS, please read our contributing docs before submitting a pull request.