* add `WalkAction` to indicate how the `walk` function should behave
You can `Continue` its execution (the default behaviour), `Skip` walking
the current node, or `Stop` walking entirely.
* walk the nodes of `@theme` directly
There is no need to walk the `@theme` itself or to create a temporary
array here.
* improvement: skip walking
* only allow CSS variables inside `@theme`
* update error message
* Only set border-style for appropriate border side
Fixes#13121.
Something to consider is that this implementation will still have issues if we ever implement support for utilities like `border-r-dashed`. 6am and I just woke up and am going to the gym now but leaving this as a note to consider when I get back before merging :)
* Fix typos in test names
* Revert playground change
---------
Co-authored-by: Adam Wathan <4323180+adamwathan@users.noreply.github.com>
* Support old important modifier position
* update
---------
Co-authored-by: Adam Wathan <4323180+adamwathan@users.noreply.github.com>
Co-authored-by: Jordan Pittman <jordan@cryptica.me>
In some environments, depending on the Node version importing a `.json`
file without a `with` or `assert` doesn't work.
Let's play it safe and use an `fs.readFileSync` instead.
* move `cli` to its own package `@tailwindcss/cli`
* minify builds when using `tsup`
* prefer tsup cli flag over tsup.config.ts file
* add `--clean`, to make sure `dist/` folders are cleaned before building
* make CLI esm only
* use version of `tailwindcss` instead of the version of `@tailwindcss/cli`
* only output `@property foo` once instead of N times
* compute the indent once
* improve performance by using strings and for-loops
* drop unnecessary new line
The pretty printing is fairly basic, but it adds some space between
properties `color: red;`, adds newlines after `;`, `{`, and `}`.
Last but not least, it indents nested CSS based on depth with 2 spaces.
This way we can re-use the workflow that already exists on the `master`
branch and it will allow us to trigger manual releases from the `next`
branch without making changes to the `master` branch.
* feat: add contain utilities
* chore: lint
* Support mulptiple contain properites
Support multiple contain properties, such as "contain-size contain-layout". Drop contain-unset as we haven't added -unset variants for other utilities.
* Update Vite; fix test regex
Vite is generating files like "index--T9oO-MP.css", which required relaxing the regex used in tests.
---------
Co-authored-by: Alexander <github@lichter.io>
* Ensure max specificity of 001 in all Preflight rules
* Update changelog
* Update changelog
---------
Co-authored-by: Adam Wathan <4323180+adamwathan@users.noreply.github.com>
Co-authored-by: Jordan Pittman <jordan@cryptica.me>
* Reduce specificity of `rtl`, `ltr`, and `dark` variants
Reduce specificity of `rtl`, `ltr`, and `dark` variants (when using `darkMode: 'class'`) to make them the same as other variants. This also sorts the LTR/RTL and dark variants later in the variant plugin list to ensure that the reduced specificity doesn't cause them to start "losing" to other variants to keep things as backwards compatible as possible.
Resolves a long-standing issue where `darkMode: 'media'` and `darkMode: 'class'` had different specificity, which meant switching your dark mode strategy could break your site.
* Update changelog
---------
Co-authored-by: Adam Wathan <4323180+adamwathan@users.noreply.github.com>
* add `*` as child variant
* add `*` as allowed variant character
* update test to reflect Lightning CSS output
* add `childVariant` test
* Update changelog
---------
Co-authored-by: Adam Wathan <4323180+adamwathan@users.noreply.github.com>
Co-authored-by: Robin Malfait <malfait.robin@gmail.com>
Co-authored-by: Gregor Kaczmarczyk <github@aggreggator.de>
* feat(preflight): simplify sans-serif font stack
`-apple-system` and `BlinkMacSystemFont` were historically needed for
IE11 and chakra-based Edge (The one that wasn't chromium-based).
https://caniuse.com/font-family-system-ui has more details around it.
* further simplify `font-family`
* update tests
* update changelog
---------
Co-authored-by: Robin Malfait <malfait.robin@gmail.com>