1374 Commits

Author SHA1 Message Date
Brad Cornes
8cd60171e0 always populate the file modified map 2021-05-26 18:20:29 +01:00
Robin Malfait
e119fc9745
make sure to populate the file modified map 2021-05-26 18:20:46 +02:00
Adam Wathan
342a52fccc Don't reuse fileModifiedMap from existing context
This causes changes in template files to be ignored on the second build.
2021-05-26 10:25:28 -04:00
Brad Cornes
55653ba004 move fileModifiedMap to context (fixes #4400) (#4470) 2021-05-26 09:43:05 -04:00
Brad Cornes
6bf6738683 Add transform and extract APIs (#4469)
* add `transform` and `extract` APIs

* make svelte transform part of the transformer stuff
2021-05-26 09:43:05 -04:00
Brad Cornes
e6395c817e replace parse-glob (fixes #4454) (#4458) 2021-05-26 09:43:05 -04:00
Adam Wathan
1849e35f14 Refactor internals to decouple watch strategies and extract IO
Co-authored-by: Robin Malfait <malfait.robin@gmail.com>
2021-05-26 09:43:05 -04:00
Adam Wathan
c8a5f816f4
JIT: Add support for before/after pseudo-elements (#4461) 2021-05-26 08:57:02 -04:00
Adam Wathan
2f1541123d JIT: Assign source to nodes inserted into @tailwind directives 2021-05-24 15:08:38 -04:00
Jason Safaiyeh
ea3892fc91
Add comment to clarify vertical-align warning (#4434)
* Add comment to clarify vertical-align warning

* fix typo

* Update preflight.css

Co-authored-by: Adam Wathan <adam.wathan@gmail.com>
2021-05-24 11:46:50 -04:00
Adam Wathan
5fa665835f Fix formatting issues 2021-05-20 13:43:17 -04:00
Adam Wathan
d8bd507b9b
JIT: Add per-side border colors (#4404) 2021-05-20 13:35:39 -04:00
Brad Cornes
787348b373
use dir-dependency messages (#4388) 2021-05-20 07:09:57 -04:00
Adam Wathan
23da6b6172
JIT: Replace @tailwind screens with @tailwind variants (#4356)
* Update CHANGELOG

* JIT: Replace `@tailwind screens` with `@tailwind variants`
2021-05-14 13:58:52 -04:00
Adam Wathan
87df93de0a
Support opacity modifiers for colors in JIT (#4348)
* Support opacity modifiers for colors in JIT

* Add test for function colors

* Support opacity modifiers for plugins with arbitrary "any" type
2021-05-14 13:07:56 -04:00
Adam Wathan
6be797633f Remove accidental log 2021-05-13 12:06:50 -04:00
Adam Wathan
30dc2990c3
Error when @layer used without matching @tailwind directive (#4335)
Also refactor to only detect `@tailwind` directives once per build to improve performance.
2021-05-12 16:58:03 -04:00
Robin Malfait
87a4516871
add a link to the docs describing JIT watch mode (#4332)
This will help people, when the process looks like it is "hanging",
while in fact it is watching for changes.
2021-05-12 13:44:48 -04:00
Adam Wathan
6d51f9a08a Add read-only variant to JIT 2021-05-11 15:36:18 -04:00
Mateusz
f89bf5f4a6
Add :read-only variant (#4102)
* Add :read-only variant

* Added read-only variant to defaultConfig.stub

Co-authored-by: FunnyScarf <5177092+dyzajash@users.noreply.github.com>
2021-05-11 15:29:23 -04:00
Adam Wathan
7991646eff
Add screen function (#4318) 2021-05-11 15:25:25 -04:00
Adam Wathan
5ebe5e8309
Remove dependency on postcss-functions (#4317)
* Write postcss-functions ourselves

* Add test for nested theme calls

* Remove unused import
2021-05-11 14:33:05 -04:00
Adam Wathan
522787ac41 Revert fix lint errors?! 2021-05-11 14:25:34 -04:00
Adam Wathan
9fc13a6564 Fix lint errors 2021-05-11 13:55:02 -04:00
Twentylives
77ef260156
Refactor util functions (#2616)
* Refactor getAllConfigs util function

* Update eslint parser options to ES2020
2021-05-10 11:22:47 -04:00
Adam Wathan
4bfa21f756
Support border-opacity with default border color (#4277)
* Move border reset to borderColor plugin, support opacity

* Update JIT tests

* Don't use opacity variable for default border color when borderOpacity is disabled

* Fix tests
2021-05-08 06:59:14 -04:00
Adam Wathan
a22398cbdb Add empty variant support to JIT 2021-05-07 14:48:41 -04:00
Alex
212bec9354
use href to get the full path of the file (#4044)
* use href to get the full path of the file
fixes https://github.com/tailwindlabs/tailwindcss/issues/4043

* drop query strings and document fragment from path
2021-05-07 14:48:09 -04:00
Brad Cornes
6a7d156608 Resolve purge paths (#4214)
* resolve purge paths

* add test for purgecss pattern resolution

* resolve purgecss patterns relative to the config file if there is one

* account for raw content when transforming purgecss options

* append test name to postcss `from` option in purge tests
fixes tests hanging

* add test for relative purge path resolution in JIT mode
2021-05-07 13:56:16 -04:00
Adam Wathan
425c73feec Ensure variants are grouped properly for plugins with order-dependent utilities (#4273) 2021-05-07 13:56:16 -04:00
Adam Wathan
dec1fc3df3 Support forcing coercion type with arbitrary value syntax (#4263)
* Support forcing coercion type with arbitrary value syntax

* Refactor + more tests
2021-05-07 13:56:16 -04:00
Brad Cornes
73fe57aea9 [JIT] Add support for "raw" purge content (#4272)
* add support for "raw" purge content

* add support for raw content extensions
2021-05-07 13:56:16 -04:00
Adam Wathan
114baeeef1 Support applying important utilities in JIT (#4260) 2021-05-07 13:56:16 -04:00
Adam Wathan
82a13cde84 Ignore unknown types when hashing config 2021-05-07 13:56:16 -04:00
Robin Malfait
c7bcfe52cd simplify animation tests and improve stability (#4250)
This will make sure that we tackle a few additional edge cases:

- When the `name` is the same as a reserved keyword, then it will be
  used as a `name` as well. E.g.: 1s ease ease infinite; Will result in
  a name of `ease` as well.
- We take care of trimming and multiple spaces.
- We don't generate 8k tests anymore, which means that these specific
  tests only take a second instead of 10 seconds.
2021-05-07 13:56:15 -04:00
Robin Malfait
0c5c5409d7 Improve matchUtilities API and make it work with the AOT engine (#4232)
* implement matchUtilities2

* ensure animation names without keyframes are not prefixed

* remove matchBase

* call addUtilities for each group individually

* WIP: Write plugins using matchUtilities2

* MORE

* Fix arbitrary value support for fontSize

* Fixes, update fixtures

* Rebuild fixtures

* Don't generate `divide` class with no modifier

* Fixes, rebuild fixtures

* Rename matchUtilities2 to matchUtilities

* Delete bad tests

* Remove temp files GROSS

* Clean stuff up

* Support no return in matchUtilities

Co-authored-by: Adam Wathan <adam.wathan@gmail.com>
2021-05-07 13:56:15 -04:00
Adam Wathan
f9707015f8 Note new matchUtilities API design 2021-05-07 13:56:15 -04:00
Adam Wathan
cc4d1d2658 Refactor fontVariantNumeric to remove mode condition 2021-05-07 13:56:15 -04:00
Adam Wathan
297cb675df Remove support for returning an array of functions in matchUtilities
Can add again if we need it?
2021-05-07 13:56:15 -04:00
Adam Wathan
cd2db712c5 Very basic AOT matchUtilities support 2021-05-07 13:56:15 -04:00
Robin Malfait
d497777202 [WIP] Unify JIT and AOT code paths (#4188)
* WIP

* WIP

* Finish combining JIT and AOT plugins

Still lots of clean up that can be done in some of the more complex ones, but at least it's one file per plugin now.

* Remove unused import

* Fix AOT generation bugs

* Move corePlugins/index.js to corePlugins.js

* Convert JIT files to ESM

* Move tests

* Reorder core plugins to match JIT order

* Update AOT apply tests

* Unify utils

* Combine plugin lists to one single source of truth

* Finish resolving merge conflicts, fix tests

Co-authored-by: Adam Wathan <adam.wathan@gmail.com>
2021-05-07 13:56:15 -04:00
Axel Hernández Ferrera
ed1727ab86 Improve @apply performance (#3718)
* Split the buildUtilityMap function to memoize the static part

* fix tests
2021-05-07 13:56:14 -04:00
Adam Wathan
57102aaa5a Refactor preserving rgb/hsl when adding alpha channel 2021-05-07 13:56:14 -04:00
Federico Ciardi
4daf57e543 feat: transform hsl to hsla (#3850)
* feat: transform `hsl` to `hsla`

* feat: update plugins using `toRgba`

* Test `gradientColorStops`

* Add test for `ringWidth`

* Add percentage symbol after Saturation and Lightness
2021-05-07 13:56:14 -04:00
David Luhr
6c7f3c8f8c Add background-origin utilities (#4117)
* Add background-origin utilities

* Update fixtures

* Update basic usage test

* Change sort order for background origin

* Move background origin after other background properties
2021-05-07 13:56:14 -04:00
Robin Malfait
9546d337e6 Fix invalid arg type (#3978)
* default to `tailwind.css` file when no input is given

* skip undefined files

* update forgotten test fixtures
2021-05-07 13:56:13 -04:00
Adam Wathan
59b7396365 Escape commas in native escapeClassName and nameClass functions 2021-05-07 13:56:13 -04:00
Adam Wathan
a05b36996b Add CSS filter support (#3923)
* Implement `filter` helper classes with all methods

* Rename filter plugins/utilities, drop filter opacity, add drop shadow

* Remove non-final default filter values

* Working on default filter values, add basic JIT support

* Working on blur values

* New blur values (these are ~okay)

* Match drop-shadow values to box-shadows by eye as best as possible

* Update tests

* Fix kitchen sink test

* Add filter variants configuration

* Move drop-shadow to end of filters list

Co-Authored-By: Peter Neupauer <peter@neupauer.sk>

* Add invert variants configuration

* Add backdrop-filter utilities

* Update tests

* Transition filters by default

* Alphabetize new config keys

* Optimize filter plugins for JIT + add arbitrary value support

Except for drop-shadow, will add that once we can think it through a bit.

Co-authored-by: Nick Schmidt <nick@kreativgebiet.com>
Co-authored-by: Peter Neupauer <peter@neupauer.sk>
2021-05-07 13:56:13 -04:00
Peter Neupauer
04a1771700 Add list-item display utility (#3929)
Signed-off-by: Peter Neupauer <peter@neupauer.sk>
2021-05-07 13:56:13 -04:00
Adam Wathan
f34214eccc Add mix-blend-mode and background-blend-mode utilities (#3920)
* Add mix-blend-mode utilities

* Rename mix-blend-mode utilities to `mix-blend-*`

Co-Authored-By: Peter Neupauer <peter@neupauer.sk>

* Add `background-blend-mode` utilities

Co-Authored-By: Peter Neupauer <peter@neupauer.sk>

Co-authored-by: Peter Neupauer <peter@neupauer.sk>
2021-05-07 13:56:13 -04:00