11 Commits

Author SHA1 Message Date
Jordan Pittman
deefbf5aaf
Handle theme keys with slashes when using theme() in CSS (#8831)
* Fix lookup of `theme(…)` paths with slashes in them

* Update changelog
2022-07-11 10:47:17 -04:00
Jordan Pittman
9778b528dc
Provide default to <alpha-value> when using theme() (#8652)
* Ensure default alpha is 1.0 when using new `<alpha-value>` format with the theme function

* Update changelog
2022-06-15 15:11:08 -04:00
Jordan Pittman
1c24d7a473
Detect alpha value in CSS theme() function when using quotes (#8625)
* Allow alpha value inside quotes

* Optimize regex

* Add test

* Update changelog
2022-06-13 15:32:52 -04:00
Jordan Pittman
7aa2d4ddf3
Don’t clip slashes inside brackets when using the theme function (#8563) 2022-06-09 14:09:57 -04:00
Jordan Pittman
64b4e6df7b
Replace rgb and hsl helpers with <alpha-value> placeholder for colors with custom properties (#8501)
* implement <alpha-value>

* remove `rgb`/`hsl` helpers, use `<alpha-value>` instead

* never pass undefined to `withAlphaValue`

* WIP

* WIP

* WIP

* WIP

* Update changelog

* Cleanup

Co-authored-by: Robin Malfait <malfait.robin@gmail.com>
2022-06-02 10:21:20 -04:00
Jordan Pittman
50bed74cdc
Support alpha values for theme() function (#8416)
* Fix typo

* Support alpha modifier for theme color values

* Eliminate redundant object creation in resolveFunctionKeys

Building an object of N keys incrementally using Object.reduce + splat results in N intermediate objects. We should just create one object and assign each key.

* Switch to inline theme values in theme fn in config

* Add test case

And fix typos that were definitely not there

* Update changelog
2022-05-25 13:54:30 -04:00
Jordan Pittman
08a07f6e02
Support square bracket notation in paths (#6519) 2021-12-15 11:09:29 -05: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
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
Adam Wathan
1849e35f14 Refactor internals to decouple watch strategies and extract IO
Co-authored-by: Robin Malfait <malfait.robin@gmail.com>
2021-05-26 09:43:05 -04:00
Adam Wathan
7991646eff
Add screen function (#4318) 2021-05-11 15:25:25 -04:00