No description
Find a file
Robin Malfait f99302c626
Support @apply for classes outside of a @layer (#5378)
* support `@apply` for classes outside of a `@layer`

* Add failing test for respecting source order

* sort rules when using `@apply`

The `layer` was not taken into account yet when we resolved the rules
from the applyCache. This is because we set the `classCache` to the
`matches` inside of the `generateRules` function. You can think of them
as "raw" rules I guess. However, it is later in that function that we
apply the `layerOrder` to the `sort`.

This does mean that when you `@apply font-bold text-red-500` that the
rules inside the `.target {}` will be in order of the "normal" css as
well.

Co-authored-by: Adam Wathan <adam.wathan@gmail.com>
2021-09-07 21:03:46 -04:00
.github setup npm registry url 2021-09-07 15:58:32 +02:00
integrations Remove AOT (#5340) 2021-09-01 17:13:59 +02:00
jest JIT: Optimize universal selector usage by inlining only the relevant selectors (#4850) 2021-07-01 06:33:37 -04:00
nesting Remove AOT (#5340) 2021-09-01 17:13:59 +02:00
perf Performance improvements + memory leak fix (#3032) 2020-12-11 15:03:49 +01:00
scripts Remove AOT (#5340) 2021-09-01 17:13:59 +02:00
src Support @apply for classes outside of a @layer (#5378) 2021-09-07 21:03:46 -04:00
stubs Enable extended color palette (#5384) 2021-09-06 14:29:03 -04:00
tests Support @apply for classes outside of a @layer (#5378) 2021-09-07 21:03:46 -04:00
.editorconfig Convert new stuff to use ES6 modules 2017-08-27 18:02:41 -04:00
.eslintignore Generate plugin list file (#4725) 2021-06-23 14:13:03 -04:00
.eslintrc.json Remove duplicate prettier.config.js settings from .eslintrc.json (#5087) 2021-09-01 17:41:43 +02:00
.gitignore Remove AOT (#5340) 2021-09-01 17:13:59 +02:00
base.css Remove preflight CSS export in favor of base 2019-02-11 12:38:46 -05:00
CHANGELOG.md Changelog formatting 2021-09-06 15:35:25 -04:00
colors.js Enable extended color palette (#5384) 2021-09-06 14:29:03 -04:00
components.css Move CSS files to root for easier imports 2018-03-13 10:05:24 -04:00
defaultConfig.js Remove lodash (#5390) 2021-09-06 14:15:10 -04:00
defaultTheme.js Remove lodash (#5390) 2021-09-06 14:15:10 -04:00
LICENSE Avoid updating license every year 2017-12-29 22:32:43 +01:00
package-lock.json Simplify negate value (#5389) 2021-09-06 14:26:32 -04:00
package.json Simplify negate value (#5389) 2021-09-06 14:26:32 -04:00
plugin.js Add default interop to tailwindcss/plugin 2020-10-06 14:34:35 -04:00
prettier.config.js Add Prettier configuration file (prettier.config.js) (#3713) 2021-05-13 09:07:24 -04:00
README.md use actions workflow status in readme badge (#4787) 2021-06-26 10:46:16 -04:00
resolveConfig.js Support new presets key + extending core plugins config (#2474) 2020-10-08 11:21:39 -04:00
screens.css Add screen.css file for postcss-import convenience 2019-05-12 10:36:59 -04:00
tailwind.css Undo accidental changes to CDN build process 2019-12-25 13:54:09 -05:00
utilities.css Move CSS files to root for easier imports 2018-03-13 10:05:24 -04:00
variants.css JIT: Replace @tailwind screens with @tailwind variants (#4356) 2021-05-14 13:58:52 -04:00

Tailwind CSS
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.