4857 Commits

Author SHA1 Message Date
Robin Malfait
59395097ed
expose hasDash for the intellisense plugin (#9594) 2022-10-17 17:13:33 +02:00
Robin Malfait
4041c863b8
Ensure --content is used in the CLI when passed (#9587)
* update changelog

* ensure `--content` is taken into account

* cleanup tests

- Use `rm` instead of deprecated `rmdir`
- Type the returnType correctly

* use a file not included in `content` of your tailwind.config.js file
2022-10-17 16:40:50 +02:00
Robin Malfait
6f77caabfa
Normalize the value for aria-* and data-* variants (#9588)
* ensure to normalize the `value` for `aria-` and `data-` attributes

* update changelog
2022-10-17 13:30:23 +02:00
Robin Malfait
bc004455bc
Expose context.getVariants for intellisense (#9505)
* add `context.getVariants`

* use `modifier` instead of `label`

* handle `modifySelectors` version

* use reference

* reverse engineer manual format strings if container was touched

* use new positional API for `matchVariant`

* update changelog
2022-10-17 12:38:21 +02:00
Robin Malfait
b7d5a2f247
ensure all tests run 2022-10-16 21:50:30 +02:00
Robin Malfait
c2854dae71
Calculate tag for releases based on package.json version (#9572)
* calculate tag for the release

This is based on the name we use in the version e.g.: `3.2.0-beta.2`. If
no name can be found in the version, we will default to `latest`

* ignore node_modules caching for now
v3.2.0-beta.2
2022-10-16 16:20:21 +02:00
Jordan Pittman
855fa300a0 Disable npm cache for insiders for now 2022-10-16 08:43:21 -04:00
Jordan Pittman
9c48973a57
Fix content path detection on Windows (#9569)
* Fix content path detection on Windows

* Update changelog

* Drop npm caches for now
2022-10-16 08:42:19 -04:00
Robin Malfait
042089a775
split build and linking step 2022-10-15 23:51:57 +02:00
Robin Malfait
74df4c3980
re-add node_modules cache
This in combination with `cache: npm` for the `setup-node` would be
awesome if that works.
2022-10-15 23:43:23 +02:00
Robin Malfait
2a88642c08
use setup-node cache in other workflows as well 2022-10-15 23:28:39 +02:00
Robin Malfait
b02f0a0e59
use cache from setup-node 2022-10-15 23:22:18 +02:00
Robin Malfait
0929e00cbd
use Node 14 for insiders release 2022-10-15 23:13:13 +02:00
Adam Wathan
6cd1631be7
Add dynamic data-* variant (#9559)
* Add data variant

* Update CHANGELOG.md

Co-authored-by: Jonathan Reinink <jonathan@reinink.ca>
Co-authored-by: Adam Wathan <4323180+adamwathan@users.noreply.github.com>
2022-10-15 08:41:13 -04:00
depfu[bot]
3f9ef7c72e Update eslint to version 8.25.0 2022-10-15 00:45:03 +00:00
Robin Malfait
963a836a62
bump GitHub action versions (#9560)
* bump GitHub action versions

* use GITHUB_ENV instead of the deprecated `::set-output`
2022-10-15 01:55:07 +02:00
Adam Wathan
9289e60001
Update CHANGELOG.md 2022-10-14 16:51:20 -04:00
depfu[bot]
e6f20a4223
Update postcss-nested to version 6.0.0 (#9546)
Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com>
2022-10-14 16:50:29 -04:00
Jonathan Reinink
a2bca6303b
Update CHANGELOG.md 2022-10-14 14:55:20 -04:00
Jonathan Reinink
2cae04296a
Add aria variants (#9557)
* Add aria variants

* Add group and peer variants to test

* Add support for group and peer modifiers
2022-10-14 14:54:10 -04:00
Jordan Pittman
66f39a46ab
Add new min and max variants (#9558)
* Rename test variants

* Allow internally negating screens

* Refactor

* Add min/max screen variants

* wip

* Update changelog

* Update tests

* Sort list of variants properly

Technically each test isn’t 100% sorted right in isolation because prettier decisions are basically project-wide. This is close enough though.

* Update tests
2022-10-14 14:25:25 -04:00
Jordan Pittman
3011f46cd8 Enable generalizedModifiers flag by default 2022-10-13 14:13:02 -04:00
Jordan Pittman
45d1a1b593
Add generalized modifier support to matchUtilities (#9541)
* Change `matchVariant` API to use positional arguments

* Fix CS

wip

* Change match variant wrap modifier in an object

Needed for compat w/ some group and peer plugins

* Add modifier support to matchUtilities

* refactor

* Hoist utility modifier splitting

* Rename fn

* refactor

* Add support for generic utility modifiers

* Fix CS

* wip

* update types

* Warn when using modifiers without the option

* Allow modifiers to be a config object

* Make sure we can return null from matchUtilities to omit rules

* Feature flag generalized modifiers

We’re putting a flag for modifiers in front of matchVariant and matchUtilities

* cleanup

* Update changelog

* Properly flag variants using modifiers

* Fix test
2022-10-13 14:01:17 -04:00
Jordan Pittman
b5651e88c3
Fix content key plugin types mismatch (#9545)
* Fix plugin types

* Update changelog
2022-10-13 13:46:50 -04:00
depfu[bot]
a8a2e2a719 Update autoprefixer to version 10.4.12 2022-10-13 00:03:00 +00:00
Robin Malfait
4338849ff4
Prepare for container queries setup (#9526)
* setup for container queries

* remove container query implementation itself

This will be moved to its own plugin.

* update changelog

Co-authored-by: Jordan Pittman <jordan@cryptica.me>
2022-10-12 12:24:46 +02:00
Jordan Pittman
8773fe6c96
Switch to alternate variant label / modifier syntax (#9520)
* Prototype alternate label syntax

* Rename to modifier

* fix tests

update tests

update

Fix

* Update changelog
2022-10-12 11:46:19 +02:00
Dawood Khan Masood
1824c459df
Adding support for baseline in placeItems & alignContent utility (#9507)
* Update corePlugins.js

* Update corePlugins.js

* Update changelog

Co-authored-by: Jordan Pittman <jordan@cryptica.me>
2022-10-10 11:14:38 -04:00
Dawood Khan Masood
c5ca373cbd
Adding support for baseline in placeContent utility (#9498)
* Update corePlugins.js

* Move class

* Update changelog

Co-authored-by: Jordan Pittman <jordan@cryptica.me>
2022-10-07 13:33:20 -04:00
Jordan Pittman
56d9c43539
Make Config completely optional for plugins (#9502)
* Make `Config` completely optional for plugins

Right now the `Config` type requires a `content` key. However, for plugins, this should be completely optional. There’s little reason for a plugin to override content. All other keys are already optional by virtue of using `Partial<…>` so we’ll do the same for the `Config` type used by plugins.

* Update changelog
2022-10-07 10:45:22 -04:00
depfu[bot]
e7b4d33c54 Update postcss to version 8.4.17 2022-10-07 14:13:07 +00:00
depfu[bot]
3a5ebadbdb Update esbuild to version 0.15.10 2022-10-06 22:28:52 +00:00
Robin Malfait
5788a9753a
Add experimental labels for variants (#9456)
* add ability to add a `label`

This could be used for named groups or named container queries in the
future.

* expose `container` to `matchVariant`

Ideally we don't have to do this. But since we will be implementing
`group` and `peer` using the `matchVariant` API, we do require it for
the `visited` state.

* implement `group` and `peer` using the `matchVariant` API

* remove feature flag for `matchVariant`

* update changelog
2022-10-06 13:53:51 -04:00
depfu[bot]
211c81eef0 Update @swc/jest to version 0.2.23 2022-10-06 02:44:20 +00:00
Robin Malfait
7677c593ec
Implement the supports variant (#9453)
* implement a `supports` variant

* update changelog

* use `--tw` instead of `--tw-empty`
2022-10-04 17:55:10 +02:00
depfu[bot]
22cd14e331 Update @swc/core to version 1.3.4 2022-10-03 10:49:08 +00:00
peter madsen
8de17cb648
add armv7 to build-cli.yml (#9460)
believe it's needed to complete the armv7 support added here:  4ff417c5b6
2022-10-01 15:32:03 +02:00
Robin Malfait
727de668fd
Improve type checking for formal syntax (#9448)
* Improve type checking for formal syntax

* Add test

* Change order of test class name

* fix failing tests

* prefer `position` over `size` for backwards compatibility reasons

Previously `bg-[10px_10%]` generated `background-position: 10px 10%` before we introduced the fallback plugins.
Therefore we should prefer `position` over `size` as the default for backwards compatibility.

* update changelog

* ensure correct order

Thanks Prettier!

* update changelog

Co-authored-by: lzt1008 <lzt1008@live.com>
Co-authored-by: Jordan Pittman <jordan@cryptica.me>
Co-authored-by: liangzhengtai <liangzhengtai_i@didiglobal.com>
2022-09-29 18:24:51 +02:00
Robin Malfait
94d6e7299a
Implement fallback plugins when arbitrary values result in css from multiple plugins (#9376)
* use test with non-any type plugin

* choose backgroundSize over backgroundPosition

Ensure that `backgroundColor` can take any value

* add tests to verify fallback plugins

* implement fallback plugins

Whenever an arbitrary value results in css from multiple plugins we
first try to resolve a falback plugin.

The fallback mechanism works like this:

- If A has type `any` and B has type `color`, then B should win.

  > This is because `A` will match *anything*, but the more precise type
    should win instead. E.g.: `backgroundColor` has the type `any` so
    `bg-[100px_200px]` would match both the `backgroundColor` and
    `backgroundSize` but `backgroundSize` matched because of a specific
    type and not because of the `any` type.
- If A has type `length` and B has type `[length, { disambiguate: true }]`, then B should win.
  > This is because `B` marked the `length` as the plugin that should
    win in case a clash happens.

* Add any type to a handful of plugins

Needs tests tho

* Add any type to `border-{x,y,t,r,b,l}` plugins

* Add test for any type

* Split on multiple lines

* fixup

* add tests for implicit `any` types

* rename `disambiguate` to `preferOnConflict`

* update tests to reflect `any` types a bit better

* update changelog

* annotate any-type test with a bit more information

Just for future debugging reasons!

Co-authored-by: Jordan Pittman <jordan@cryptica.me>
2022-09-29 17:26:27 +02:00
Jordan Pittman
52ab315439 Update changelog 2022-09-26 13:10:47 -04:00
Robin Malfait
26cab53c15
Support sort function in matchVariant (#9423)
* support `sort` function in `matchVariant`

This will ensure that we can sort arbitrary variant values (and
hardcoded values) to ensure the order.

* update changelog
2022-09-26 13:08:12 -04:00
depfu[bot]
19b86e62e0 Update eslint to version 8.23.1 2022-09-23 22:46:12 +00:00
Adam Wathan
6df8cd9c57
Update CHANGELOG.md 2022-09-23 14:13:36 -04:00
lightyen
d77b9cec18
Add fill-none and stroke-none utilities (#9403) 2022-09-23 14:12:57 -04:00
Jordan Pittman
5ea752e85c
Add @config support (#9405)
* Refactor CLI

* Add `@config` support

* Update changelog

Co-authored-by: Robin Malfait <malfait.robin@gmail.com>
2022-09-23 13:48:17 -04:00
Jordan Pittman
bf44941049
Allow resolving content paths relative to the config file (#9396)
* Update lockfile

* Tweak formatting

* Refactor content path parsing

* Allow resolving content paths relative to the config file

* Include resolved symlinks as additional content paths

* Update changelog

* Work on suite of tests for content resolution

* reformat integration test list

* Move content resolution tests to integration

* Update future and experimental types
2022-09-23 08:09:02 -04:00
Jonathan Reinink
7ea02c2d34
Update CHANGELOG.md 2022-09-22 15:19:43 -04:00
k-utsumi
2574a881e5
Add break-keep utility (#9393)
*  Add `word-break: keep-all` with `keep-all`

ref. https://developer.mozilla.org/en-US/docs/Web/CSS/word-break

`whitespace-nowrap` and `word-break: keep-all` behave differently in different browsers.

Demo: https://jsfiddle.net/h1aj6nvy/

There is a difference between Firefox and Google chrome.

* Rename `keep-all` to `break-keep`

Co-authored-by: Jonathan Reinink <jonathan@reinink.ca>
2022-09-22 15:17:54 -04:00
Positive person
1d82327bc2
Update CHANGELOG.md (#9388)
Typo fix
2022-09-21 12:30:05 -04:00
Robin Malfait
e62525226e
Ignore unset values (like null or undefined) when resolving the classList for intellisense (#9385)
* ignored `undefined` and `null` value values for intellisense

We are not completely ignoring "all" falsey values, because then we
would get rid of `0` values (e.g.: `p-0`) which is not what we want.

* update changelog
2022-09-21 14:31:08 +02:00