4365 Commits

Author SHA1 Message Date
Robin Malfait
a4d1bdb7fa
Fix angle brackets in content (#5585)
* move to real regexes

These regexes are only calculated once so we don't really have a
performance penalty here. However, it's a bit nicer to do it this way
because now you don't have to think about the proper escapes.

/.*/.source will basically take the source of the regex ".*" without
flags and converts it to a string with the proper escapes for you.

Fun fact, this `.source` property has been supported since Chrome,
Firefox and Safari version 1.

* allow for `'>'` in `content-['>']`
2021-09-24 15:22:23 +02:00
depfu[bot]
77d124368a Update jest-diff to version 27.2.0 2021-09-24 10:13:34 +00:00
Jonathan Reinink
cd3ff42c7e
Fix list item in changelog 2021-09-23 22:23:55 -04:00
Jonathan Reinink
78f0aa4b1b Add file variant to changelog
Co-Authored-By: Adam Wathan <4323180+adamwathan@users.noreply.github.com>
2021-09-23 16:03:31 -04:00
Luke Warlow
f0ce096d8d
Add variant for ::file-selector-button pseudo element (#4936)
* Add variant for file-selector-button pseudo element

* Rename `file-selector-button` variant to `file`

Co-Authored-By: Adam Wathan <4323180+adamwathan@users.noreply.github.com>

Co-authored-by: Jonathan Reinink <jonathan@reinink.ca>
Co-authored-by: Adam Wathan <4323180+adamwathan@users.noreply.github.com>
2021-09-23 15:43:37 -04:00
Robin Malfait
a8836eb093
Improve experimental universal selector improvements (#5517)
* add dedicated tests for the experimenal universal selector improvements

* Add failing test

* keep pseudo elements

* re-add logic for special types (class, id, attribute)

Co-authored-by: Adam Wathan <adam.wathan@gmail.com>
2021-09-23 15:05:35 -04:00
Jonathan Reinink
f9ee118c01 Add break utilities to changelog
Co-Authored-By: Adam Wathan <4323180+adamwathan@users.noreply.github.com>
2021-09-23 14:32:40 -04:00
Jonathan Reinink
744249d631
Add break-before, break-inside and break-after utilities (#5530)
* Add `break-before` utilities

* Add `break-inside` utilities

* Add `break-after` utilities

* Add `break-before/inside/after` utilities to basic usage test

* Remove `break-before` and `break-after` utilities that have no browser support

* Rename `break-inside: avoid-column` utility to `break-inside-avoid-column`
2021-09-23 14:31:23 -04:00
depfu[bot]
f2bc50accf
Update @vercel/ncc to version 0.31.1 (#5547)
Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com>
2021-09-22 15:52:10 -04:00
Adam Wathan
3d1118f5df Fix svelte test 2021-09-21 12:43:44 -04:00
Adam Wathan
b7d2c8f11e Add test for lit-html syntax 2021-09-21 12:41:58 -04:00
Adam Wathan
a44f58f913 Fix test extension 2021-09-21 12:41:00 -04:00
Adam Wathan
6121cbe22a Remove svelte CSS test file 2021-09-21 12:38:11 -04:00
Adam Wathan
2d9759b604 Rename svelte tests 2021-09-21 12:37:49 -04:00
Robin Malfait
a54521f26a
Fix incorrect import in defaultConfig and defaultTheme (#5527)
We should import from `lib` and not from `src`
2021-09-17 13:16:38 +02:00
depfu[bot]
f4635e0d42 Update prettier to version 2.4.1 2021-09-17 07:35:41 +00:00
Robin Malfait
6c0b7bc8b2
Pattern safelisting (#5511)
* splitup nameClass functionality

We want to separate the logic of the formatting the class and of turning
it into a class with a `.` and escaped values.

* collect base classList

* implement `safelist` where you can use regex patterns
2021-09-16 14:47:41 +02:00
Robin Malfait
14d49a9fd5
Warn when nesting is detected (#5489)
* warn when nesting is detected

* add todo for improving warning messages
2021-09-16 14:13:45 +02:00
Adam Wathan
c64bc1f652
Update README.md 2021-09-14 14:49:09 -04:00
Adam Wathan
ebc1c7a91f Update issue templates 2021-09-14 11:51:35 -04:00
Robin Malfait
516ba530f0
Setup integration tests (#5466)
* setup integration tests

* fix rgb color syntax

* ensure integration tests always exit

If for any reason the integration tests fail, then it will run forever
on CI (~2hours or something). The `--forceExit` is not ideal but it will
prevent long running processes.

* fix incorrect test

We were never properly waiting for the command to finish.

* handle AbortError properly

In CI, when an AbortController gets aborted an error is thrown
(AbortError). If we don't catch it properly then it will "leak" and the
test will fail.

* improve IO functions

* quit integration tests after 10seconds

* only test a few integrations

* test all integrations using matrix

This will cancel other builds when one fails, it will also separate the
output per integration which can be useful especially now that we are
still figuring things out.

* rename `build` to `test`

* add --verbose flag to receive output in the console

* when reading stdout or stderr, wait a certain about to ensure stability

Debouncing for 200ms means that if another message comes in within those
200ms we delay the execution of the callback.

* simplify workflow

* use terminal output instead of disk events

* cache node_modules for integrations

* empty commit, to test cache hits
2021-09-14 16:18:14 +02:00
Adam Wathan
fda1c4403f
Update config.yml 2021-09-13 11:45:01 -04:00
Adam Wathan
e7dbc1a21f
Update config.yml 2021-09-13 11:44:22 -04:00
Adam Wathan
3254e55ec4 Update changelog 2021-09-12 16:40:25 -04:00
Adam Wathan
16a910b0f5 Add arbitrary value support for vertical-align utilities 2021-09-12 16:39:11 -04:00
Adam Wathan
6816ad66a0 Add align-sub and align-super utilities
Co-Authored-By: TCatinaud <5670642+tcatinaud@users.noreply.github.com>
2021-09-12 16:30:45 -04:00
Mattèo Gauthier
df011dc9b4
Added guidelines before running 'npm run test' used to prevent test failure in CONTRIBUTING.md (#4728)
* Added guidelines before running 'npm run test' used to prevent test failure

* Update .github/CONTRIBUTING.md

Co-authored-by: Geshi <ohayo@geshii.moe>

* Update .github/CONTRIBUTING.md

Co-authored-by: Sachin Raja <58836760+sachinraja@users.noreply.github.com>

* Update CONTRIBUTING.md

Co-authored-by: Geshi <ohayo@geshii.moe>
Co-authored-by: Sachin Raja <58836760+sachinraja@users.noreply.github.com>
Co-authored-by: Adam Wathan <adam.wathan@gmail.com>
2021-09-12 16:20:02 -04:00
Adam Wathan
57e504d4cc Update changelog 2021-09-12 16:18:50 -04:00
Adam Wathan
fda68f7138
Add border-hidden utility (#5485)
Co-Authored-By: 藍 <50108258+kwaa@users.noreply.github.com>

Co-authored-by: 藍 <50108258+kwaa@users.noreply.github.com>
2021-09-12 16:18:17 -04:00
Adam Wathan
b16eb2034e
Add arbitrary value support for transition-property (#5481)
Co-Authored-By: Eric F. <2483476+ericbf@users.noreply.github.com>

Co-authored-by: Eric F. <2483476+ericbf@users.noreply.github.com>
2021-09-12 10:07:57 -04:00
Adam Wathan
bbdda8504c Update changelog 2021-09-12 09:59:31 -04:00
Luke Warlow
3b81c5329b
Add scroll-behavior utilities (#5388) 2021-09-11 09:13:28 -04:00
Michael
f332bee41b
Update color warnings to match other warnings (#5412)
* Update color warnings to match other warnings

Make the color deprecation warnings match the style of other warnings in tailwind

* Fix formatting

* Use log helper

Co-authored-by: Adam Wathan <adam.wathan@gmail.com>
2021-09-10 14:41:19 -04:00
Adam Wathan
7859cee257 Update changelog 2021-09-10 09:52:16 -04:00
Adam Wathan
b0cf6eded3
Support using functions as colors when disabling color opacity utilities (#5470) 2021-09-10 09:35:15 -04:00
Robin Malfait
50b766dd47
Remove variants related code (#5465)
* drop `variants` related resolveConfig functionality

More AOT code that we could get rid of!

* drop more files!

I keep finding these unused files 😅

* Update setupContextUtils.js

Co-authored-by: Adam Wathan <adam.wathan@gmail.com>
2021-09-10 09:34:27 -04:00
Robin Malfait
30badadd21
ensure that we fallback to the first argument without any flags (#5464) 2021-09-10 10:14:44 +02:00
depfu[bot]
e36d242c8d Update @babel/core to version 7.15.5 2021-09-09 21:58:43 +00:00
Robin Malfait
9daebe43b9
Replace underscore with space in arbitrary values (#5460)
* refactor dropShadow plugin, use `matchUtilities`

* replace `_` with ` ` for arbitrary values

* remove custom `asList` function

* do not replace escaped underscores with spaces
2021-09-09 18:10:04 +02:00
Brad Cornes
4919cbfbb8
Update color parsing and formatting (#5442)
* Replace `culori` with simple color parser

* Use space-separated color syntax

* Update default color values to use space-separated syntax

* Update separator regex

* Fix tests

* add tests for the new `color` util

Also slightly modified the `color` util itself to take `transparent`
into account and also format every value as a string for consistency.

Co-authored-by: Robin Malfait <malfait.robin@gmail.com>
2021-09-09 16:15:53 +02:00
Jonathan Reinink
12fa78b9ca
Add column utilities (#5457)
Co-Authored-By: Adam Wathan <4323180+adamwathan@users.noreply.github.com>
Co-Authored-By: Cody <codytooker@gmail.com>
2021-09-09 09:29:44 -04:00
Robin Malfait
688357fdde
Inline plugins (#5455)
* filter out `..Variant` plugins for the core-plugin-list

* inline all corePlugins

* move preflight css to `./src/css`

* remove individual plugins

* convert export default object to named exports

Note: Normally I would use export function ..., but since we also have
some export let xx = createUtilityPlugin in this file, it means that all
the `export function` declarations would be hoisted and therefore won't
have the correct order anymore.

To fix this, I used `export let xx = () => {}` instead of the usual
`export function xx() {}`

* drop unused `variants()` function

This was required for AOT mode.

* make a few plugins shorter
2021-09-09 09:22:50 -04:00
Adam Wathan
00025020f7 Update changelog 2021-09-09 08:37:08 -04:00
Robin Malfait
249f6ff596
drop unused files (#5453) 2021-09-09 08:39:14 +02:00
Jonathan Reinink
ec0562b887 Add text-indent update to changelog
Co-Authored-By: Adam Wathan <4323180+adamwathan@users.noreply.github.com>
2021-09-08 15:17:30 -04:00
Jonathan Reinink
1c10cf261b
Add text-indent utilities (#5449)
Co-Authored-By: Adam Wathan <4323180+adamwathan@users.noreply.github.com>

Co-authored-by: Adam Wathan <4323180+adamwathan@users.noreply.github.com>
2021-09-08 15:16:46 -04:00
Jonathan Reinink
60414f4799 Add will-change update to changelog 2021-09-08 14:51:30 -04:00
Jonathan Reinink
b04dab6be6
Add will-change utilities (#5448)
Co-Authored-By: Adam Wathan <4323180+adamwathan@users.noreply.github.com>
2021-09-08 14:50:31 -04:00
Robin Malfait
eb3fe8fe27
ensure that divide utilities inject a default border color (#5438) 2021-09-08 11:39:32 +02:00
Adam Wathan
a5425abd86 Support any arbitrary value for accentColor 2021-09-07 21:12:57 -04:00