183 Commits

Author SHA1 Message Date
Robin Malfait
691ed02f63
Remove AOT (#5340)
* make `jit` mode the default when no mode is specified

* unify JIT and AOT codepaths

* ensure `Object.entries` on undefined doesn't break

It could be that sometimes you don't have values in your config (e.g.: `presets: []`), this in turn will break some plugins where we assume we have a value.

* drop AOT specific tests

These tests are all covered by JIT mode already and were AOT specific.

* simplify tests, and add a few

Some of the tests were written for AOT specifically, some were missing. We also updated the way we write those tests, essentially making Tailwind a blackbox, by testing against the final output.
Now that JIT mode is the default, this is super fast because we only generate what is used, instead of partially testing in a 3MB file or building it all, then purging.

* add some todo's to make sure we warn in a few cases

* make `darkMode: 'media'`, the default

This also includes moving dark mode tests to its own dedicated file.

* remove PostCSS 7 compat mode

* update CLI to be JIT-first

* fix integration tests

This is not a _real_ fix, but it does solve the broken test for now.

* warn when using @responsive or @variants

* remove the JIT preview warning

* remove AOT-only code paths

* remove all `mode: 'jit'` blocks

Also remove `variants: {}` since they are not useful in `JIT` mode
anymore.

* drop unused dependencies

* rename `purge` to `content`

* remove static CDN builds

* mark `--purge` as deprecated in the CLI

This will still work, but a warning will be printed and it won't show up
in the `--help` output.

* cleanup nesting plugin

We don't have to duplicate it anymore since there is no PostCSS 7
version anymore.

* make sure integration tests run in band

* cleanup folder structure

* make sure nesting folder is available

* simplify resolving of purge/content information
2021-09-01 17:13:59 +02:00
Adam Wathan
f20655c2d3
Fix backdrop opacity variants (#4892)
We weren't generating backdrop opacity variants properly due to a typo in the default config.
2021-07-04 09:50:14 -04:00
Adam Wathan
ff64417ff7
Add blur-none with intent to deprecate blur-0 (#4614)
We always use `none` for other utilities where the values have string names like `sm`, but for `blur` I chose `blur-0` for some idiotic reason. Can't have that.
2021-06-10 12:13:19 -04:00
Adam Wathan
77dfac2bfa
JIT: Add caret-color utilities (#4499)
Co-Authored-By: Jesse Katsumata <niconico.clarinet@gmail.com>

Co-authored-by: Jesse Katsumata <niconico.clarinet@gmail.com>
2021-05-28 13:55:42 -04:00
Adam Wathan
c8a5f816f4
JIT: Add support for before/after pseudo-elements (#4461) 2021-05-26 08:57:02 -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
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
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
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
Adam Wathan
9c454e1d4b Add isolation utilities (#3914) 2021-05-07 13:56:12 -04:00
Adam Wathan
77ca74bb88 Add box-decoration-break utilities (#3911) 2021-05-07 13:56:12 -04:00
Adam Wathan
5b2d3ea056 Generate dark variants for ringOpacity by default 2021-05-07 13:56:10 -04:00
Yehuda Neufeld
0e4d8de0df Enable dark variants by default for opacity utilities (#2975)
* enable `dark` by default for opacity utilities

* removed `opacity`, as unneeded

* removed `ringOpacity`, as unneeded
2021-05-07 13:56:10 -04:00
Cameron Huntington
cb6a7fada3 alphabetize transformOrigin and transitionDuration properties (#2828) 2021-05-07 13:56:10 -04:00
Kevin Lang
7a295af48c add help cursor (#3199) 2021-05-07 13:56:09 -04:00
Andrew Brown
6af1481e93
update 'empty' position in variant order 2021-02-26 02:31:59 -06:00
Andrew
01b2ee5590 add 'empty' to variant order 2021-01-30 18:08:15 -06:00
Adam Wathan
3de0c48bd6 Don't mix unitless values with units in the same scale
Resolves an issue where `ring-offset-0` didn't actually work because `calc(0 * 1)` fails to compute, need a unit.
2020-11-17 08:26:44 -05:00
Adam Wathan
e40079a457 Fix cascading shadow/ring bug, ensure default ring color 2020-11-16 19:47:45 -05:00
Robin Malfait
b86bdbcd7e
Cleanup custom properties (#2771)
* prefix custom properties with tw-

* prefix custom properties with tw- in tests

* prefix gradient values in the defaultConfig

* inline gradient-via-color

* simplify --tw-tailwind-empty to --tw-empty

* replace the long --tw-font-variant-numeric-... to the way shorter --tw-fvn-...

* Rename --tw-box-shadow to --tw-shadow

To match class name.

* Rename font-variant-numeric variables

* Remove 'transform' from transform variables

* Shorten gradient variables

* Fix style

Co-authored-by: Adam Wathan <adam.wathan@gmail.com>
2020-11-16 11:45:55 -05:00
Adam Wathan
b3ed7248c2 Move black and white colors to colors.js 2020-11-13 19:25:17 -05:00
Adam Wathan
e0788efd4f Generate focus, focus-within, and dark variants for ring utilities 2020-11-12 08:45:21 -05:00
Adam Wathan
f6923b1d6b Update default variants
Disable hover/focus for fontWeight, enable focus-within for outline and ringWidth, enable group-hover for boxShadow, enable group-hover and focus-within for textDecoration.
2020-11-11 16:12:41 -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
Adam Wathan
d4fcd2eb8f
Add new ring utilities for custom focus styles and rounded outlines (#2747)
* Add ring utilities

* Remove redundant shadows, add 5% and 95% to opacity scale

* Undo changes to build file

* Update boxShadow.test.js
2020-11-09 16:39:49 -05:00
Adam Wathan
1a21f0721c Enable focus-within where useful by default 2020-11-07 15:14:09 -05:00
Adam Wathan
369cfae290 Add "shadow-solid" utility 2020-11-06 22:36:18 -05:00
Adam Wathan
b0782385c9 Derive shadow-outline from new blue-300 2020-11-06 22:33:31 -05:00
Adam Wathan
ba153fdf5e Reformat config file 2020-11-06 09:40:03 -05:00
Robin Malfait
5259560652
extend height values 2020-11-06 14:57:58 +01:00
Robin Malfait
7f05204ce7
add spacing 11 2020-11-06 14:57:41 +01:00
Robin Malfait
700866ce5e
add indigo, swap gray with coolGray 2020-11-06 14:34:14 +01:00
Robin Malfait
9aa633171a
sort configuration file 2020-11-06 14:30:16 +01:00
Robin Malfait
6a219f927c
add darkMode alternatives as a comment 2020-11-06 14:30:09 +01: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
Soviut
923e7af176
renamed to prose (#2574) 2020-10-22 09:54:43 -04:00
Adam Wathan
aea20276d5
Update default border color and placeholder color in preflight (#2633) 2020-10-20 22:44:03 -04:00
Adam Wathan
47026e5d9a
Add steps of 10 to opacity scale (#2632) 2020-10-20 22:26:57 -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
ae5b3d312d Enable focus for z-index by default 2020-10-20 21:27:15 -04:00
Adam Wathan
28985b6cd5 Enable group-hover for select utilities by default 2020-10-20 21:27:15 -04:00
Adam Wathan
edf0ba6fe4 Use fewer spacing values, better curate fractional widths per plugin
This saves a tremendous amount of file size and none of the stuff that is cut here is important.
2020-10-20 21:27:15 -04:00
Adam Wathan
84741776af Remove 16ths from relative sizing scale 2020-10-20 21:27:15 -04:00
Adam Wathan
16fac7e571
Adjust font size scale: move 64px to 60px, 80px to 72px (#2619)
* Move 64px to 60px, 80px to 72px

* Update changelog
2020-10-20 08:31:50 -04:00
Adam Wathan
fd8bacd7ae
Add new color palette (#2623)
* Add new color palette

* Replace local require when scaffolding config

* Remove unused import
2020-10-19 20:18:53 -04:00
Navith
3141425c29
Fix duplicated 12 in gridTemplateColumns in the default config (#2612) 2020-10-19 08:12:39 -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
7376d7c8b1 Enable dark mode 2020-10-18 15:43:50 -04:00