Commit graph

5282 commits

Author SHA1 Message Date
Adam Wathan
9824cb64a0 Update version in package.json 2024-07-25 09:20:52 -04:00
Adam Wathan
aa6c10f67f Add missing heading to changelog 2024-07-25 09:16:26 -04:00
Adam Wathan
245058c7fd Update changelog for v3.4.7 2024-07-25 09:06:56 -04:00
Philipp Spiess
605d8cd5eb
Update CHANGELOG.md 2024-07-25 10:13:56 +02:00
Philipp Spiess
680c55c11c
Normalize attribute selector for data-* and aria-* modifiers (#14037)
Fixes #14026 
See #14040 for the v4 fix

When translating `data-` and `aria-` modifiers with attribute selectors,
we currently do not wrap the target attribute in quotes. This only works
for keywords (purely alphabetic words) but breaks as soon as there are
numbers or things like spaces in the attribute:

```html
<div data-id="foo" class="data-[id=foo]:underline">underlined</div>
<div data-id="f1" class="data-[id=1]:underline">not underlined</div>
<div data-id="foo bar" class="data-[id=foo_bar]:underline">not underlined</div>
```

Since it's fairly common to have attribute selectors with `data-` and
`aria-` modifiers, this PR will now wrap the attribute in quotes unless
these are already wrapped.

| Tailwind Modifier  | CSS Selector |
| ------------- | ------------- |
| `.data-[id=foo]`  | `[data-id='foo']`  |
| `.data-[id='foo']`  | `[data-id='foo']`  |
| `.data-[id=foo_i]`  | `[data-id='foo i']`  |
| `.data-[id='foo'_i]`  | `[data-id='foo' i]`  |
| `.data-[id=123]`  | `[data-id='123']`  |

---------

Co-authored-by: Robin Malfait <malfait.robin@gmail.com>
2024-07-24 18:46:21 +02:00
Philipp Spiess
866860e6a6
Print eventual lightning CSS parsing errors when the CSS matcher fail (#14034) 2024-07-23 14:40:11 +02:00
Jordan Pittman
bdc87ae1d7
Fix class detection in Slim templates with attached attributes and IDs (#14019)
* Fix class detection in Slim templates with attached attributes and IDs

* Update changelog

* Tweak regex
2024-07-18 11:21:20 -04:00
Jordan Pittman
d622977b2a Update changelog 2024-07-16 10:52:51 -04:00
Josh Wilson
0573c0769a
Loosen :is() wrapping rules in applyImportantSelector for more readable output. (#13900) 2024-07-16 10:51:45 -04:00
Jordan Pittman
9c29e47c5f 3.4.6 2024-07-16 09:37:15 -04:00
Jordan Pittman
daa5266081 Update changelog 2024-07-16 09:36:07 -04:00
Georg Ledermann
ae6a8d532b
Fix extracting utilities from slim/pug templates (#14006)
A class name starting with number like `2xl:bg-red-500` must not be removed.

Resolves #14005
2024-07-16 09:34:20 -04:00
Jordan Pittman
a0dbb3d876 Update runner image 2024-07-15 11:07:30 -04:00
Jordan Pittman
10a1197989 3.4.5 2024-07-15 10:56:16 -04:00
Adam Wathan
9033d625e1
Always generate -webkit-backdrop-filter property (#13997)
* Always generate -webkit-backdrop-filter property

* Update changelog

---------

Co-authored-by: Adam Wathan <4323180+adamwathan@users.noreply.github.com>
2024-07-12 20:48:08 -04:00
Adam Wathan
074736c1d6
Avoid over-extracting utilities from candidates with decimal values (#13959)
* Avoid over-extracting utilities from candidates with decimal values

Prevent candidates like `px-1.5` from generating both the `px-1.5` class and the `px-1` class.

* Update CHANGELOG.md

---------

Co-authored-by: Adam Wathan <4323180+adamwathan@users.noreply.github.com>
2024-07-05 14:46:51 -04:00
Robin Malfait
588a8225eb
Add .mts and .cts config file detection (#13940)
* add `tailwind.config.cts` and `tailwind.config.mts` as default config files

* always use jiti when working with ESM or TS files

* update changelog

* add integration test for `.cts` and `.mts` configuration files
2024-07-03 23:09:35 +02:00
Simon He
0de1f0cce4
refactor(util): code refactor (#13872)
* refactor(util): code refactor

* refactor(util): code refactor
2024-06-24 09:13:12 -04:00
Simon He
a61e5aa06b
fix: typo (#13864) 2024-06-20 06:02:11 -04:00
Robin Malfait
eef91c9065
Use no value instead of blur(0px) for backdrop-blur-none and blur-none utilities (#13830)
* map `backdrop-blur-none` and `blur-none` to ` ` instead of `blur(0px)`

* add test for `backdrop-blur-none` and `blur-none`

* update changelog
2024-06-13 15:49:59 +02:00
Jordan Pittman
9e928ce0be
Disable automatic var() injection for anchor properties (#13826)
* Disable automatic `var()` injection for CSS anchor positioning properties

* Update tests

* Update changelog
2024-06-13 09:19:08 -04:00
Jordan Pittman
ff6f085da2 3.4.4 2024-06-05 12:55:54 -04:00
Jordan Pittman
ed024eeb09 Update changelog 2024-06-05 12:54:06 -04:00
Jordan Pittman
325e7c03ce
Bump deps (#13797) 2024-06-05 12:53:06 -04:00
Jordan Pittman
56116b0904
Update browserslist database (#13792) 2024-06-05 09:55:47 -04:00
Jordan Pittman
8d66d94182
[v3] Support negative values for {col,row}-{start,end} utilities (#13781)
* Support negative values for `{col,row}-{start,end}` utilities

* Add tests

* Update changelog
2024-06-03 11:34:27 -04:00
victor
669109efdd
Don't prefix classes in arbitrary values of has-*, group-has-*, and peer-has-* variants (#13770)
* Added tests to verify that classes are prefixed when using `has-*` variants with arbitrary values

* Fix test

* Don't prefix classes in arbitrary values in `has-*` variants

* Update changelog

---------

Co-authored-by: Jordan Pittman <jordan@cryptica.me>
2024-05-31 20:01:09 -04:00
Maxwell Barvian
9fda4616eb
Fix multiple <alpha-value> in color definitions (#13740)
* Fix multiple <alpha-value> in color definitions

Fixes #13716

* Update CHANGELOG.md

* Use `replace` with global regex

---------

Co-authored-by: Jordan Pittman <jordan@cryptica.me>
2024-05-29 11:32:48 -04:00
Jordan Pittman
f1f419a9ec 3.4.3 2024-03-27 15:18:37 -04:00
Jordan Pittman
e6c1082823
Revert changes to glob handling (#13384)
* Revert "Improve glob handling for folders with `(`, `)`, `[` or `]` in the file path (#12715)"

This reverts commit f2a7c2c453.

* Update changelog
2024-03-27 15:16:52 -04:00
Jordan Pittman
8430d8b520 3.4.2 2024-03-27 11:25:32 -04:00
Jordan Pittman
8b4a2a6770
Change dark selector so @apply works correctly with pseudo elements (#13379)
* Change dark selector so `@apply` hoists pseudo elements properly

* Update tests

* Update changelog
2024-03-27 11:03:49 -04:00
Robin Malfait
97607f1cfb
Ensure that arbitrary properties respect important configuration (#13353)
* ensure we respect important on arbitrary properties

* update changelog

* reword changelog entry
2024-03-26 11:42:41 +01:00
Adam Wathan
c033f106bc
Update CHANGELOG.md 2024-03-24 08:09:45 -04:00
Robin Malfait
bda84210d6
Only detect nesting when using @apply (#13325)
* drop nesting detection for `@tailwind`

* drop separate nesting detection entirely

* detect nesting only when using `@apply` with a class that uses nesting

* drop unnecessary `important` config

* add test to verify applying nested user CSS errors

* add error reason to tests

* update `@apply` error message
2024-03-23 19:10:51 -04:00
Allain Lalonde
3ba51d14c7
Remove leading space in box-shadow's addDefaults call (#13334)
Co-authored-by: Jordan Pittman <jordan@cryptica.me>
2024-03-23 05:35:02 -04:00
Allain Lalonde
a53d854d1d
Fix missing xx-large and remove double x-large absolute size (#13324)
* fixing double x-large absolute size

x-large appears twice in the set of absolute sizes.

I believe the second one is meant to be 'xx-large'.

* update changelog

---------

Co-authored-by: Robin Malfait <malfait.robin@gmail.com>
2024-03-22 20:03:21 +01:00
Magnar Ovedal Myrtveit
ea90d3a81c
Reset letter spacing for form elements (#13150)
* Reset letter spacing for form elements

Some browsers, such as Chrome, set `letter-spacing: normal` for form elements. For consistency with the other styles, it should be set to `inherit` by Preflight.

* wip

* Update changelog

---------

Co-authored-by: Jordan Pittman <jordan@cryptica.me>
2024-03-22 14:49:22 -04:00
Jordan Pittman
b10b431d97
Transpile import.meta.url in config files (#13322)
* Use Babel to transpile configs when import.meta is present

* Update minimum jiti version

* Update changelog
2024-03-22 12:45:19 -04:00
Robin Malfait
44b3b429a8
Cleanup oxide — Part #2 (#13312)
* remove all oxide related code

* Update lightningcss to version 1.24.1

* update tests to match bumped Lightning CSS output

---------

Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com>
2024-03-22 17:12:14 +01:00
depfu[bot]
c28c718f72
Update esbuild to version 0.20.2 (#13315)
Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com>
2024-03-22 14:56:21 +01:00
Jordan Pittman
27e4b65e0b
Fix crash showing completions in Intellisense when using a custom separator (#13306)
* Fix variant completions in intellisense when using a custom separator

* Update changelog
2024-03-21 19:38:17 -04:00
Robin Malfait
9b90c53bad
Cleanup oxide — Part #1 (#13304)
* swap engines

* remove all oxide related files

* drop swap engine step from CI

* drop oxide tests where we read from a `.oxide.*` file

* drop swap-engines.js file

* drop unused `oxide` variable

Let's make eslint happy!
2024-03-21 18:23:31 +01:00
Robin Malfait
d56d241fd1
Ensure dashes are allowed in variant modifiers (#13303)
* sync package-lock.json

* ensure dashes are allowed in variant modifiers

* update changelog
2024-03-21 15:25:28 +01:00
Robin Malfait
41e94ebfab
Add missing workflow_dispatch (#13302)
* add missing `workflow_dispatch`

* re-add `ci-stable.yml`, purely to fix a broken badge on npmjs.com

* update badge in README to point to `ci.yml` instead of `ci-stable.yml`
2024-03-21 14:04:00 +01:00
depfu[bot]
3eb8cab547
🚨 [security] Update vite 4.3.2 → 5.1.6 (major) (#13287)
* Update vite to version 5.1.6

* Fix regex

---------

Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com>
Co-authored-by: Jordan Pittman <jordan@cryptica.me>
2024-03-21 09:02:38 -04:00
depfu[bot]
3a466bca04
Update rollup to version 4.13.0 (#13279)
Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com>
2024-03-21 13:42:05 +01:00
depfu[bot]
41c90f6e07
Update sass to version 1.72.0 (#13296)
Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com>
2024-03-21 08:31:08 -04:00
Robin Malfait
f5408d60d9
Fix failing integration tests in CI (#13300)
* run prettier on integrations

* update media query syntax

* drop oxide related workflows

* rename `{workflow}-stable` to just `workflow`
2024-03-21 13:23:19 +01:00
saibotk
d86fd0bb5b
CI: Add provenance to all published packages (#13097)
* CI: Add provenance to all published packages

This commit adds provenance for all published packages. See the NPM documentation [0].

Provenance will allow people to verify that the tailwindcss packages were actually built on GH Actions and with the content of the corresponding commit. This will help with supply chain security.

For this to work, the `id-token` permission was added only where necessary.

[0]: https://docs.npmjs.com/generating-provenance-statements

* chore: Add missing repository links to packages

This is needed for provenance, to link the repository to the build accoring to the NPM docs [0].

[0]: https://docs.npmjs.com/generating-provenance-statements#prerequisites
2024-03-07 15:32:58 -05:00