394 Commits

Author SHA1 Message Date
Adam Wathan
425c73feec Ensure variants are grouped properly for plugins with order-dependent utilities (#4273) 2021-05-07 13:56:16 -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
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
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
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
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
Adam Wathan
7a5c73878f Derive JIT display utilities from AOT display plugin 2021-05-07 13:56:13 -04:00
Erik Verbeek
49461d9e7a Added support for display : inline-table (#3563)
* Added support for display : inline-table

* Moved the inline-table class to the suggested spot and updated the tests

Co-authored-by: Erik Verbeek <erik@evidencio.com>
2021-05-07 13:56:12 -04:00
Adam Wathan
ab41845a78 Remove justify-auto and place-items-auto
These CSS values don't even exist.
2021-05-07 13:56:12 -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
Peter Timoshevsky
2b0e71a4ec Fix typo in preflight.css 2021-05-07 13:56:11 -04:00
Robin Malfait
7ad9a548ef add version and license (#3255)
* add current version & license

* generate fixtures

* update changelog

Co-authored-by: Adam Wathan <adam.wathan@gmail.com>
2021-05-07 13:56:10 -04:00
Adam Wathan
ca21b4e6b4 Set explicit opacity value on placeholder pseudo-element (#3308)
Fixes #3300.
2021-05-07 13:56:09 -04:00
Robin Malfait
d1ef88a61b
ring defaults (#2951)
* add ring defaults

Fixes #2911

* add tests for the ringWidth utility

+ defaults

* update changelog
2020-12-02 15:45:04 -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
b95cf5f595
Remove clearfix utility (#2766) 2020-11-13 22:25:23 -05:00
Adam Wathan
62a47f95b1 Properly support colors as closures with ring utilities 2020-11-13 19:41:08 -05:00
Adam Wathan
5ec45fa6c0 Remove gap fallbacks
Safari >= 12 or gtfo
2020-11-13 09:43:21 -05:00
Adam Wathan
879f0887ed Add ring-inset, always reset ring variables 2020-11-11 21:58:54 -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
c3dd3b6845 Make boxShadow respect ring shadows
This is to prevent box-shadows from overriding rings that are added manually by plugins like the custom forms plugin.
2020-11-10 14:24:22 -05:00
Adam Wathan
4eecc2751c Convert 'none' to transparent shadow
To make shadow comma-separated list safe.
2020-11-09 19:10:34 -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
9585ae15a3
Don't explicitly set font/line-height on body, inherit from html instead (#2729) 2020-11-04 10:19:11 -05:00
Adam Wathan
86132595a3
Rename flex-no-wrap to flex-nowrap (#2676) 2020-10-27 10:55:19 -04:00
Adam Wathan
fe0e8e92de
Rename whitespace-no-wrap to whitespace-nowrap (#2664)
* Rename whitespace-no-wrap to whitespace-nowrap

* Update changelog

* Update purge fixture
2020-10-23 15:12:42 -04:00
Robin Malfait
68dbc5f981
only prefix animation names that are defined (#2641) 2020-10-21 17:07:13 -04:00
Adam Wathan
02cba631bc
Use left/right instead of inline-start/end for space/divide utilities (#2644) 2020-10-21 17:05:20 -04:00
Adam Wathan
6ad5a199af
Set font on body and on html (#2643)
modern-normalize sets it on `body` so we need to defeat that.
2020-10-21 16:21:28 -04:00
Adam Wathan
6e20880987 Use [hidden] instead of template in space/divide utilities 2020-10-21 16:01:49 -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
aea20276d5
Update default border color and placeholder color in preflight (#2633) 2020-10-20 22:44:03 -04:00
Adam Wathan
e13f083c4b Join arrays when using theme consistently 2020-10-19 11:32:22 -04:00
Twentylives
a2337e6cc8
Simplifying animation utilities generation (#2606) 2020-10-18 15:44:10 -04:00
Adam Wathan
998f3ffc03 Move truncate to textOverflow plugin 2020-10-18 15:43:50 -04:00
Adam Wathan
4959a99f77 Remove deprecated gap utilities 2020-10-18 15:43:50 -04:00
Slava Nossar
d38c358945
Use translate3d() (#1380)
* use translate3d

* add translate3d to test fixtures

* create `transform-gpu` utility

* merge in test from master

* update tests

* add responsive variants to tests
2020-10-18 07:31:23 -04:00
Twentylives
23100317f4
Using CSS Logical Properties in space and divide layout utilities (#1883)
* CSS Logical Properties in Space Between utilities

Switching to logical properties to fix compatibilty issues with non LTR layouts.

* CSS Logical Properties in Divide Width utilities
Switching to logical properties to fix compatibilty issues with non LTR layouts.
2020-10-17 19:34:19 -04:00
Adam Wathan
fca7af76d5 Remove word-wrap fallback for IE11 2020-10-16 15:42:24 -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
Robbert Klarenbeek
2c6f237685 Improve font stack with standard font families 2020-10-16 14:16:06 -04:00
Adam Wathan
e3ed12782f Update prettier 2020-10-16 13:30:06 -04:00
Adam Wathan
b84049fb8e Update animation plugin to use nameClass 2020-10-16 12:53:41 -04:00