5243 Commits

Author SHA1 Message Date
Robin Malfait
2ba42fe53d
Copy README file to every package (#13096)
* copy README file to every package

* point workflow status badge to correct workflow file
2024-03-06 08:49:31 -05:00
Robin Malfait
0597489604
Move the CLI to its own package @tailwindcss/cli (#13095)
* 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`
2024-03-06 05:41:12 -05:00
Robin Malfait
bab74da932
Prep alpha release (#13089)
* use `next` as default release channel

* bump versions to `4.0.0-alpha.1`
2024-03-05 14:46:10 -05:00
Kris Braun
abb702bf8f
Add README, LICENSE, and CONTRIBUTING (#13088)
* Add README, LICENSE, CONTRIBUTING, and CODE_OF_CONDUCT

* Add alpha status to README.

* Remove intro sentence

---------

Co-authored-by: Adam Wathan <4323180+adamwathan@users.noreply.github.com>
2024-03-05 14:45:39 -05:00
Robin Malfait
ca07ca8c69
Only output @property foo once instead of N times (#13087)
* 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
2024-03-05 18:04:33 +01:00
Robin Malfait
191643f663
pretty print generated CSS by default (#13086)
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.
2024-03-05 17:58:17 +01:00
Robin Malfait
86e71194e7
use oxide tag instead of internal tag by default
This will allow us to install `tailwindcss@oxide`
2024-03-05 15:26:37 +01:00
Robin Malfait
1988978fc3
rename release.yml to release-oxide.yml
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.
2024-03-05 14:50:40 +01:00
Robin Malfait
117ceefe70
ensure CI runs against PRs that have to go into next 2024-03-05 14:43:40 +01:00
Robin Malfait
a500854a9f
run CI on master and next branch 2024-03-05 14:31:08 +01:00
Robin Malfait
a68de1df27
introduce v4 codebase 2024-03-05 14:29:15 +01:00
Robin Malfait
32cf8aa0fb
remove v3 codebase 2024-03-05 13:29:12 +01:00
N
4429ab8010
Update CHANGELOG.md 3.4.1 release date (#13024) 2024-02-26 07:38:32 -05:00
Kris Braun
780163c58a feat: add contain utilities (#12993)
* 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>
2024-02-23 18:16:15 -05:00
Clement Chang
576798620c Add mix-blend-plus-darker utility (#12923)
* feat: add plus-darker support for mix-blend-mode

* Fix failing test

* Update changelog

* Formatting

---------

Co-authored-by: Jonathan Reinink <jonathan@reinink.ca>
2024-02-23 16:37:32 -05:00
Robin Malfait
f2a7c2c453 Improve glob handling for folders with (, ), [ or ] in the file path (#12715)
* sync package-lock.json

* modify `normalizePath` to keep `\\[`, `\\]`, `\\(` and `\\)` into account

* manually escape () and [] characters in globs

* update changelog
2024-02-23 16:35:49 -05:00
Jordan Pittman
89f0f54751 Update changelog 2024-02-13 14:17:59 -05:00
Jordan Pittman
240a0addd3 Sort arbitrary properties alphabetically across multiple class lists (#12911)
* Sort arbitrary properties alphabetically across multiple files

* Update test
2024-02-13 14:17:23 -05:00
Jordan Pittman
9e62bf2043 Split :has rules when using experimental.optimizeUniversalDefaults (#12736)
* Split `:has` rules when using optimizeUniversalDefaults

* Update changelog
2024-01-09 15:10:58 -05:00
Adam Wathan
50fa6dd13e Ensure max specificity of 0,0,1 for button and input Preflight rules (#12735)
* 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>
2024-01-09 11:08:11 -05:00
Jordan Pittman
7361468f77 3.4.1 v3.4.1 2024-01-05 15:31:16 -05:00
Jordan Pittman
508e7f2349 Fix code style 2024-01-05 15:23:38 -05:00
Jordan Pittman
3fb57e55ab Restore old behavior for class dark mode, add new selector and variant options for dark mode (#12717)
* Add dark mode variant option

* Tweak warning messages

* Add legacy dark mode option

* wip

* Use `class` for legacy behavior, `selector` for new behavior

* Add simplified failing apply/where test case

* Switch to `where` list, apply changes to `dir` variants

* Don’t let `:where`, `:is:`, or `:has` be attached to pseudo elements

* Updating tests...

* Finish updating tests

* Remove `variant` dark mode strategy

* Update types

* Update comments

* Update changelog

* Revert "Remove `variant` dark mode strategy"

This reverts commit 185250438ccb2f61ba876d4676823c1807891122.

* Add variant back to types

* wip

* Update comments

* Update tests

* Rename variable

* Update changelog

* Update changelog

* Update changelog

* Fix CS

---------

Co-authored-by: Adam Wathan <4323180+adamwathan@users.noreply.github.com>
2024-01-05 15:20:11 -05:00
Jordan Pittman
78fedd5cc0 Don't add spaces to gradients and grid track names when followed by calc() (#12704)
* Don’t break gradient functions when following `calc()`

* Don’t break CSS grid track names

* Update changelog
2024-01-03 13:05:06 -05:00
Jordan Pittman
08a0a6c966 Update changelog 2023-12-21 12:20:45 -05:00
Jordan Pittman
88907757c1 Don't remove keyframe stops when using important utilities (#12639)
* Don't remove keyframe stops when using important utilities

* Fix test

* fix linting
2023-12-21 12:20:14 -05:00
Jordan Pittman
f33d6a5d75 Update CI 2023-12-19 10:25:04 -05:00
Jordan Pittman
8350cffdad 3.4.0 v3.4.0 2023-12-18 14:52:00 -05:00
Adam Wathan
fbdb858e97 Improve relative precedence of rtl, ltr, forced-colors and dark variants (#12584)
* 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>
2023-12-18 13:58:22 -05:00
Adam Wathan
dae4618e97 Update changelog 2023-12-18 13:58:22 -05:00
Luke Warlow
11a6ba3949 Move forced-colors variant after dark variant (#12582)
Also add test for the order of the forced-colors variant
2023-12-18 13:58:22 -05:00
Adam Wathan
47dbb4a2b3 Add * variant for targeting direct children (#12551)
* 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>
2023-12-18 13:58:22 -05:00
Jordan Pittman
7642e28cfe Disable tap highlights on iOS (#12299)
* Disable tap highlights on iOS

* Update changelog

* Update snapshots

* Update changelog
2023-12-18 13:58:22 -05:00
Emilia
06972065de feat(preflight): simplify sans-serif font stack (#11748)
* 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>
2023-12-18 13:58:22 -05:00
Adam Wathan
b215f13276 Update changelog 2023-12-18 13:58:04 -05:00
Ngô Quốc Đạt
9129defd0d Add logical properties support for float and clear (#12480) 2023-12-18 13:58:04 -05:00
Adam Wathan
4ef97179cd Fix typo in changelog 2023-12-18 13:58:04 -05:00
Adam Wathan
adfcccf57a Add appearance-auto utility (#12404)
* Add `appearance-auto` utility

* Update CHANGELOG

---------

Co-authored-by: Adam Wathan <4323180+adamwathan@users.noreply.github.com>
2023-12-18 13:58:04 -05:00
Luke Warlow
add51c658c Add forced-colors variant (#11694)
* Add forced-colors variant

Also add a contrast-custom variant to match custom contrast preferences

* use `toMatchSnapshot` instead of `toMatchFormattedCss`

More info: https://github.com/tailwindlabs/tailwindcss/pull/12170

* remove `contrast-custom` variant

* move `forcedColorsVariants` next to `prefersContrastVariants`

* update changelog

---------

Co-authored-by: Robin Malfait <malfait.robin@gmail.com>
2023-12-18 13:58:04 -05:00
Luke Warlow
a35e7fc199 Add forced-color-adjust utilities (#11931)
* Add forced-colors-adjust utilities

* Update forcedColorsAdjust.test.js

* use `toMatchSnapshot` instead of `toMatchFormattedCss`

More info: https://github.com/tailwindlabs/tailwindcss/pull/12170

* rename `forced-colors-adjust` -> `forced-color-adjust`

Dropped the `s` in `colors`.

* update changelog

* fix typo

* use full `forced-color-adjust-auto` and `forced-color-adjust-none` names

---------

Co-authored-by: Robin Malfait <malfait.robin@gmail.com>
2023-12-18 13:58:04 -05:00
Jordan Pittman
b3d39b185f Add spacing scale to min-width, min-height, and max-width (#12300)
* Add spacing scale to `min-width`, `min-height`, and `max-width`

* Update snapshots

* Update changelog
2023-12-18 13:58:04 -05:00
Adam Wathan
324953c093 Add subgrid utilities (#12298)
* Add subgrid utilities

* Update CHANGELOG

---------

Co-authored-by: Adam Wathan <4323180+adamwathan@users.noreply.github.com>
2023-12-18 13:58:04 -05:00
Jordan Pittman
4a2aa1ccb1 Add size-* shorthand (#12287)
* Add `size-*` shorthand

Add plugin tests

Adjust options

wip

* Update changelog
2023-12-18 13:58:04 -05:00
Adam Wathan
074f5deb89 Update CHANGELOG 2023-12-18 13:58:04 -05:00
bandogora
089fa971ff Equal number of grid columns and rows (#12180)
Update test snapshots
2023-12-18 13:58:04 -05:00
Brandon McConnell
9a26814b8d Update Preflight html styles to include shadow DOM :host pseudo-class (#11200)
* Extend current preflight `html` styles to support other root/host scopes

Supports SVG root scope, ShadowDOM, and presumably other root scopes

* Replace `:root` with `html`

* Update tests

* Update changelog

---------

Co-authored-by: Jonathan Reinink <jonathan@reinink.ca>
2023-12-18 13:58:03 -05:00
Adam Wathan
8201846565 Extend opacity scale to include all steps of 5 (#11832)
* Extend opacity scale to include all steps of 5

* Update changelog

---------

Co-authored-by: Adam Wathan <4323180+adamwathan@users.noreply.github.com>
2023-12-18 13:57:52 -05:00
Yuhei Yasuda
0183a8442b Add support for text-wrap: pretty (#12031)
* Add support for `text-wrap: pretty`

* Update changelog

---------

Co-authored-by: Jonathan Reinink <jonathan@reinink.ca>
2023-12-18 13:57:39 -05:00
Adam Wathan
9caa9547b2 Add support for text-wrap property (#11320)
Update changelog

Co-authored-by: Adam Wathan <4323180+adamwathan@users.noreply.github.com>
2023-12-18 13:57:22 -05:00
Adam Wathan
d72c1893c8 Add has-* variants for :has(...) pseudo-class (#11318)
* Add `has-*` variants for `:has(...)` pseudo-class

* Update changelog

* Fix mistake in test

---------

Co-authored-by: Adam Wathan <4323180+adamwathan@users.noreply.github.com>
2023-12-18 13:57:08 -05:00