No description
Find a file
Robin Malfait a1246de6a5
WIP: New @apply logic
use `lightningcss` and `prettier` for `toMatchFormattedCss`

Lightning CSS applies some optimizations and prettier ensures that the
output is always formatted in the same way.

In a future version, we will be using Lightning CSS to apply
optimizations like handling the nesting, optimizing selectors, sorting
declarations, simplifying colors and so on.

To guarantee that we have the same output in both the normal version and
OXIDE version, we can apply lightningcss in our tests so that it always
produces correct results in both version with the same optimizations
applied.

This also aliases `toMatchCss` to `toMatchFormattedCss` so that we can
guarantee the same output. This has a small caveat where `lightningcss`
is pretty strict. It will complain about `@media screen(md) {}` for
example. This is correct because it is not valid CSS, but we eventually
take care of it.
In this case, we will catch the error and use prettier instead (since
this should only happen in tests that doesn't use end-to-end tests, but
uses a more specialized test instead). If prettier still finds an error,
we will ensure to throw the original error.

Eventually, all the "lower" level tests, should probably become higher
level end-to-end tests. But let's do everything step by step!
2023-01-05 16:20:24 +01:00
.github Update scripts 2023-01-05 16:01:58 +01:00
integrations copy cli to oxide/cli 2023-01-05 16:01:58 +01:00
jest WIP: New @apply logic 2023-01-05 16:20:24 +01:00
nesting Ensure to transpile the PostCSS Nesting plugin (tailwindcss/nesting) (#7080) 2022-01-15 16:07:20 +01:00
oxide WIP: New @apply logic 2023-01-05 16:20:24 +01:00
perf Performance improvements + memory leak fix (#3032) 2020-12-11 15:03:49 +01:00
scripts Prepare for release (#9605) 2022-10-19 15:52:39 +02:00
src WIP: New @apply logic 2023-01-05 16:20:24 +01:00
standalone-cli Add standalone-cli build for Windows Arm64 platform (#10001) 2022-12-05 12:39:04 -05:00
stubs Add data key to theme types (#10023) 2022-12-09 10:37:42 -05:00
tests WIP: New @apply logic 2023-01-05 16:20:24 +01:00
types Fix missing blocklist type (#10239) 2023-01-04 11:53:07 +01: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 Don't emit utilities containing invalid theme fn keys (#9319) 2022-09-14 13:27:01 -04:00
.swcrc setup lightningcss 2023-01-05 16:03:26 +01:00
base.css Remove preflight CSS export in favor of base 2019-02-11 12:38:46 -05:00
CHANGELOG.md Fix missing blocklist type (#10239) 2023-01-04 11:53:07 +01:00
colors.d.ts Add TypeScript types for the tailwind.config.js file (#7891) 2022-03-22 10:24:28 +01:00
colors.js Add default interop to public available functions (#6348) 2021-12-10 11:25:10 +01:00
components.css Move CSS files to root for easier imports 2018-03-13 10:05:24 -04:00
defaultConfig.d.ts Add TypeScript types for the tailwind.config.js file (#7891) 2022-03-22 10:24:28 +01:00
defaultConfig.js Add default interop to public available functions (#6348) 2021-12-10 11:25:10 +01:00
defaultTheme.d.ts Add more explicit types for the default theme (#8780) 2022-07-07 09:05:38 -04:00
defaultTheme.js Add default interop to public available functions (#6348) 2021-12-10 11:25:10 +01:00
LICENSE Update LICENSE 2022-02-05 15:22:47 -05:00
package-lock.json setup lightningcss 2023-01-05 16:03:26 +01:00
package.json setup lightningcss 2023-01-05 16:03:26 +01:00
plugin.d.ts Make Config completely optional for plugins (#9502) 2022-10-07 10:45:22 -04:00
plugin.js Add default interop to public available functions (#6348) 2021-12-10 11:25:10 +01:00
prettier.config.js Add Prettier configuration file (prettier.config.js) (#3713) 2021-05-13 09:07:24 -04:00
README.md Fix GitHub workflow badge (#10120) 2022-12-19 10:44:47 +01:00
resolveConfig.d.ts Improve return value of resolveConfig, unwrap ResolvableTo (#9972) 2022-11-30 14:26:15 +01:00
resolveConfig.js Add default interop to public available functions (#6348) 2021-12-10 11:25:10 +01: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.