Commit graph

255 commits

Author SHA1 Message Date
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
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
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
e764df5055
Support forcing coercion type with arbitrary value syntax (#4263)
* Support forcing coercion type with arbitrary value syntax

* Refactor + more tests
2021-05-07 08:59:24 -04:00
Adam Wathan
82f4eaa683 Ignore unknown types when hashing config 2021-05-06 13:16:32 -04:00
Robin Malfait
73877aef44
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-06 09:40:06 -04:00
Robin Malfait
6628eb00ca
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-05 15:23:32 +02:00
Adam Wathan
82942e7083 Very basic AOT matchUtilities support 2021-04-30 11:21:43 -04:00
Robin Malfait
bfc61625d9
[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-04-30 10:58:40 -04:00
Adam Wathan
f9d54f0382 Refactor preserving rgb/hsl when adding alpha channel 2021-04-30 09:27:56 -04:00
Federico Ciardi
92bb81e647
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-04-30 09:09:58 -04:00
Adam Wathan
db3f97a21b Escape commas in native escapeClassName and nameClass functions 2021-04-05 11:03:54 -04:00
Adam Wathan
d98f2f829d Pass full opacityValue always 2021-03-17 17:47:08 -04:00
Dylan Vann
33dcd44dbe
Fix function colors bug (#2919) 2021-02-07 14:57:57 -05:00
Robin Malfait
eac11cf57d
Performance improvements + memory leak fix (#3032)
* fix memory leak

* add optional condition to hasAtRule

* use known tree to handle `@apply` when required `@tailwind` at rules exists

Otherwise we will generate the lookup tree.

* only generate the missing `@tailwind` atrules when using `@apply`

* update perf config to reflect 2.0 changes

* update changelog

* ensure lookup tree is correctly cached based on used tailwind atrules
2020-12-11 15:03:49 +01:00
Adam Wathan
278c2031fb Fix bug where color palette could not be empty 2020-11-13 19:51:05 -05:00
Adam Wathan
ac5970d6fb
Add support for default duration and timing function to transition property utilities (#2755) 2020-11-11 08:27:09 -05:00
Robin Malfait
df1732cce5
add ability to merge arrays of objects when using extend (#2700) 2020-10-29 10:17:10 -04:00
Robin Malfait
584316fbdc
ensure options for plugins are not stale between builds (#2695) 2020-10-28 13:46:12 -04:00
Twentylives
232035e4fc
Refactor flattenColorPalette util function (#2677) 2020-10-27 10:58:19 -04:00
Robin Malfait
09d9262666
add the ability to deep merge extended configs (#2679) 2020-10-26 11:15:50 -04:00
Robin Malfait
9e3700c08a
add function presets (#2680) 2020-10-26 09:43:31 -04:00
Enzo Innocenzi
58a600816c
feat: allow for deeply nested color objects (#2148) 2020-10-25 14:27:57 -04:00
Adam Wathan
b27608557a
Include default config by default in presets (#2660) 2020-10-23 13:23:21 -04:00
Adam Wathan
11af870f30
Support extend in variants config (#2651)
* WIP

* It's alive

* Pull default variant order from config
2020-10-23 08:58:28 -04:00
Robin Malfait
e1ef99814e
feat: prefix animation names (#2621)
* add animation value parser

* prefix animation names
2020-10-21 08:04:35 -04:00
Adam Wathan
b92f033f8b
Disable dark mode by default, rename config option to darkMode (#2631)
* Disable dark mode by default, rename config option to `darkMode`

* Rebuild fixtures
2020-10-20 21:36:05 -04:00
Adam Wathan
e13f083c4b Join arrays when using theme consistently 2020-10-19 11:32:22 -04:00
Adam Wathan
3259608813 Add 2xl breakpoint by default 2020-10-18 15:43:50 -04:00
Adam Wathan
322d366440 Extend font size scale 2020-10-18 15:43:50 -04:00
Adam Wathan
dc9d510c8a Extend spacing scale
By probably too much.
2020-10-18 15:43:50 -04:00
Adam Wathan
9a8c170223 Remove uniformColorPalette experiment 2020-10-18 15:43:50 -04:00
Adam Wathan
7376d7c8b1 Enable dark mode 2020-10-18 15:43:50 -04:00
Adam Wathan
1371e7951e Use standard font weight names by default 2020-10-18 15:43:50 -04:00
Adam Wathan
7d102598f9 Add line-heights to font-size utilities by default 2020-10-18 15:43:50 -04:00
Adam Wathan
9d40ef519c Remove default values from config that have default values even when not present at all 2020-10-18 15:43:50 -04:00
Adam Wathan
ef3d655e7b Ensure changes to withOptions plugins trigger rebuilds 2020-10-17 12:52:13 -04:00
Adam Wathan
38b4eeb288 Prettier likes parens a lot now
git blame is now broken forever.
2020-10-16 15:39:44 -04:00
Adam Wathan
e3ed12782f Update prettier 2020-10-16 13:30:06 -04:00
Adam Wathan
11690b4c9b Update all core plugins to use the same class name generation strategy 2020-10-16 12:53:41 -04:00
Adam Wathan
e897e40189 Replace special handling of 'default' with 'DEFAULT' 2020-10-16 12:53:41 -04:00
Adam Wathan
ff866775a0 Remove fallback colors 2020-10-15 15:21:06 -04:00
Adam Wathan
712fe7aeb8 Remove target feature 2020-10-15 15:21:06 -04:00
Adam Wathan
038afedfac
Merge plugins when resolving config (#2561) 2020-10-14 12:45:59 -04:00
Adam Wathan
ac82484dd9
Don't import corePlugins in resolveConfig (#2548) 2020-10-13 08:14:57 -04:00
Adam Wathan
003d94bea1
Support closures for colors in all circumstances (#2536) 2020-10-09 21:03:23 -04:00
Adam Wathan
b299b6fbe1
Support new presets key + extending core plugins config (#2474)
* WIP

* Support array for Tailwind config

* Drop array format for `presets` key instead

* Update changelog
2020-10-08 11:21:39 -04:00
Adam Wathan
d01636caff Add experimental 2xl breakpoint (#2468) 2020-10-07 14:12:42 -04:00
Adam Wathan
4d6e1e7e92 Don't escape keyframes (#2432)
* Don't escape keyframes

* Update changelog
2020-10-07 14:12:41 -04:00