4365 Commits

Author SHA1 Message Date
Robin Malfait
078186a1ef
Add css functions to data types (#6258)
* update changelog

* add tests to verify that `w-[0]` works

* ensure that `min`, `max` and `clamp` also work with arbitrary values

* update changelog
2021-12-03 18:15:03 +01:00
Avi Avinav
add8d62ea7
Add 0 as an arbitrary value for utilities (jit) (#6233) 2021-12-03 17:45:37 +01:00
depfu[bot]
94f1bb65c2 Update prettier to version 2.5.0 2021-12-02 14:23:35 +00:00
Jonathan Reinink
89c7f7d094 Update changelog 2021-12-01 06:16:36 -05:00
Jonathan Reinink
8c9b635894
Remove aspect-attrs utility (#6228) 2021-12-01 06:16:12 -05:00
depfu[bot]
81241ab512 Update @swc/cli to version 0.1.52 2021-12-01 04:30:46 +00:00
Robin Malfait
a41c4ec704
update changelog 2021-11-29 16:36:32 +01:00
Avi Avinav
f267d91e40
Remove menu element styles (#6213)
* Remove `main` element default styles

* Remove `menu` element default styles
2021-11-29 15:44:34 +01:00
Robin Malfait
12ea363e1a
Fix decoration utility ambiguity (#6217)
* remove `any` data type for decoration color plugin

The main reason for the `any` type is so that we don't have to parse the
value and can assume that this plugin handles "any" value you give it.

This is useful because `decoration-[var(--something)]` would be
correctly translated to the correct decoration property. However, we
introduce another plugin with the same `decoration` prefix.

This means that now both `textDecorationColor` and
`textDecorationThickness` have the same base utility name: `decoration`.

- `textDecorationColor` had ['color', 'any']
- `textDecorationThickness` had ['length', 'percentage']

This means that `3px` fit both in the `length` data type of the
`textDecorationThickness` plugin and in the `any` data type of the
`textDecorationColor` plugin.

Removing the `any` fixes this.

TL;DR: Only have `any` when there are no conflicting utility names.

* remove utility that doesn't generate css

Having `decoration-[var(--abc)]` is ambiguous because there are multiple
plugins that have a `decoration` utility name. In order for this to work
you have to prefix it with the type: `decoration-[color:var(--abc)]`
which is already tested in this file.
2021-11-29 15:25:43 +01:00
Robin Malfait
6b82ca89bc
Fix modifiers for arbitrary values (#6199)
* fix modifiers for arbitrary properties

The main issue was that we are splitting on the separator and popping
the last section of to know the _base_ utility. However, in this case it
would be something like `markers]` which is incorrect.

Instead we only split by the separator and ignore the separtor if it
exists between square brackets.

* add tests for modifiers + arbitrary values that contain the separator
2021-11-25 15:07:43 +01:00
Adam Wathan
22b7cb5418 Fix mistake in test to cause test to fail 2021-11-25 07:05:33 -05:00
Adam Wathan
b5802a3f72 Update changelog 2021-11-24 12:14:51 -05:00
Oscar Lee-Vermeren
d22604af04
Add remaining text-decoration utilities (#6004)
* Add `text-decoration-style` utilities

* Add remaining `text-decoration` utilities

* Add test for default underline offset

* Remove text-underline-position, don't rename underline utilities, remove DEFAULT values for decoration thickness and underline offset

* Add auto/from-font values, update tests

Co-authored-by: Adam Wathan <adam.wathan@gmail.com>
2021-11-24 12:13:08 -05:00
Oscar Lee-Vermeren
70853bafe2
Ignore .DS_Store (#6005) 2021-11-23 15:23:18 -05:00
Adam Wathan
a1bc20385d Update changelog 2021-11-23 15:21:47 -05:00
Adam Wathan
463777f0c8 Update changelog 2021-11-23 15:21:06 -05:00
Peter Neupauer
0c4af0febc
Add aspect ratio dimensions value (#6178)
* Add aspect ratio `dimensions` value

* Update defaultConfig.stub.js

Co-authored-by: Adam Wathan <adam.wathan@gmail.com>
2021-11-23 15:20:54 -05:00
Luke Warlow
a321e3c843
Add variants for orientation media feature (#6046)
* Add variants for orientation media feature

* Rename to portrait and landscape

Co-authored-by: Adam Wathan <adam.wathan@gmail.com>
2021-11-23 14:59:25 -05:00
Adam Wathan
d261531e2a
Add support for arbitrary properties (#6161)
* Basic implementation + some failing tests for edge cases

* Use asClass instead of nameClass

* Solve edge cases around content with colons

* Avoid duplicating work when parsing arbitrary properties

* Update changelog
2021-11-22 12:38:37 -05:00
Robin Malfait
56c1646300
Revert "Add ::file-selector-button reset (#6125)"
This reverts commit f94a117500266a8f5e9cfec3b03db81493b1b047.
2021-11-18 17:29:12 +01:00
Robin Malfait
f94a117500
Add ::file-selector-button reset (#6125)
* add ::file-selector-button reset

Otherwise you have to apply `file:border-solid` which you don't have to
do for other elements with borders.

See: https://play.tailwindcss.com/EvtdftCPt6

* update changelog
2021-11-18 14:25:19 +01:00
Robin Malfait
03f9de9008
Add combinable touch-action support (#6115)
* add combinable `touch-action` support

* update changelog
2021-11-17 16:04:13 +01:00
Robin Malfait
ef325ea35b
Add tuple syntax to guarantee screens order (#6104)
* add normalizeScreens function

This will allow us to normalize the various kinds of inputs to a stable
version that is consistent regardless of the input.

* use normalized screens

* add dedicated test for new tuple syntax

* make test consistent with other tests

While working on the normalizeScreens feature, some tests started
failing (the one with multiple screens), while looking at them I made
them consistent with the rest of the codebase.

* add test to ensure consistent order in screens output

* update changelog

* Update CHANGELOG.md

* Update CHANGELOG.md

Co-authored-by: Adam Wathan <adam.wathan@gmail.com>
2021-11-16 18:01:06 +01:00
Robin Malfait
6c4b86d438
Add placeholder variant (#6106)
* add `placeholder` variant

* update changelog
2021-11-16 15:33:30 +01:00
depfu[bot]
85320c25f2 Update eslint to version 8.2.0 2021-11-12 23:59:16 +00:00
Robin Malfait
a3579bcf2f
Enforce the order of pseudo elements (#6018)
* enforce the order of some variants

* update changelog

* use better algorithm
2021-11-12 16:38:03 +01:00
Robin Malfait
4e21639903
Improve nesting detection (#6011) 2021-11-10 13:15:32 +01:00
depfu[bot]
4860957148 Update cssnano to version 5.0.10 2021-11-09 12:58:46 +00:00
Robin Malfait
ac5a20420e
make version number dynamic in the test (#6017) 2021-11-08 21:30:37 +01:00
Adam Wathan
6057342593 3.0.0-alpha.2 v3.0.0-alpha.2 2021-11-08 11:49:18 -05:00
Adam Wathan
df7e71c262 Update changelog 2021-11-08 11:48:34 -05:00
depfu[bot]
028daf3ea4 Update esbuild to version 0.13.12 2021-11-07 04:43:59 +00:00
Adam Wathan
a6bcd22722 Add test for using variants with multi-class selectors 2021-11-06 07:25:32 -04:00
Robin Malfait
7eabb74bec
add test to prove @supports is kept in @layer rule (#5992) 2021-11-05 15:12:35 +01:00
Adam Wathan
79e3e098d2 Update changelog 2021-11-04 13:28:48 -04:00
Adam Wathan
d41a739186 Update changelog 2021-11-04 10:16:46 -04:00
Adam Wathan
d1f066d97a
Add support for colored box shadows (#5979)
* WIP

* add box shadow parser

* use box shadow parser

* Update default shadows, add boxShadowColor key, add shadow datatype

* Update tests

* add `valid` flag to `boxShadow` parser

Co-authored-by: Robin Malfait <malfait.robin@gmail.com>
2021-11-04 10:14:13 -04:00
depfu[bot]
c25fbc773b Update autoprefixer to version 10.4.0 2021-11-04 10:58:52 +00:00
depfu[bot]
f70175d30a Update @swc/core to version 1.2.106 2021-11-04 02:43:54 +00:00
Adam Wathan
12aa51d61d Update changelog 2021-11-03 10:53:12 -04:00
Adam Wathan
f9fb2cec12
Add full color palette for fill/stroke (#5933)
Historically we've only included `fill-current` and `stroke-current` due to file size considerations, and recommended combining them with text color utilities like this:

```html
<svg class="fill-current text-blue-500">
```

With the JIT engine, there's no real reason for this anymore, so this PR enables all colors by default, allowing you to write this out of the box instead:

```html
<svg class="fill-blue-500">
```

Giddy up.
2021-11-03 10:51:57 -04:00
Robin Malfait
ec1f7b0349
update changelog 2021-10-29 13:43:17 +02:00
Robin Malfait
d6301bd31b
update changelog 2021-10-29 12:19:42 +02:00
Robin Malfait
a82cb7baa0
bump due to security vulnerabilities (#5924) 2021-10-29 11:24:33 +02:00
depfu[bot]
ba2fd32b79 Update postcss to version 8.3.11 2021-10-28 13:14:12 +00:00
depfu[bot]
d563d23a56 Update jest to version 27.3.1 2021-10-27 14:29:30 +00:00
Jonathan Reinink
bf59a88c3e
Add new outline style, color, width and offset utilities (#5887)
* Add new outline style, color, width and offset utilities

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

* Remove old `outline` property from default config

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

* Tweak order of outline plugins

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

* Revert to previous `outline-none` styles

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

* Drop quotes from outline property

* Add offset back to `outline-none` utility

Co-authored-by: Adam Wathan <4323180+adamwathan@users.noreply.github.com>
2021-10-27 10:21:24 -04:00
Jonathan Reinink
06cb28d2bd
Add print variant (#5885)
Co-Authored-By: Adam Wathan <4323180+adamwathan@users.noreply.github.com>

Co-authored-by: Adam Wathan <4323180+adamwathan@users.noreply.github.com>
2021-10-27 10:21:02 -04:00
Robin Malfait
fd9dbe18ac
Allow the use of @media print without parens (#5898) 2021-10-27 15:04:37 +02:00
Robin Malfait
5058275f3b
Handle color transformations properly with theme(...) for all relevant plugins (#5871)
* call function for colors that are not in colors

* add all color related thingies

* transformThemeValue in a very verbose way

* handle functions by default

* cleanup, make sure we handle functions everywhere

* update changelog

Co-authored-by: Bill Criswell <bill_criswell@comcast.com>
2021-10-25 12:17:14 +02:00