9 Commits

Author SHA1 Message Date
Jordan Pittman
b6d5eca564 Don’t add spaces to negative numbers following a comma (#12324)
* Don’t add spaces to negative numbers following a comma

* Update changelog
2023-10-30 14:45:46 -04:00
Robin Malfait
4b12f838fe
Fix incorrect spaces around - in calc() expression (#12283)
* sync package-lock.json

* prevent formatting inside `env()` when formatting `calc` function

* prevent formatting keywords in `calc`

* add dedicated normalization tests

* `calc()` in `env()` should be formatted

* update changelog
2023-10-25 15:29:29 +02:00
Robin Malfait
2514820dd4 Improve automatic var injection (#12236)
* prevent automatic var injection for properties that accept `<dashed-ident>` for the value

* add test

* add `font-palette`

* improve readability
2023-10-24 13:00:02 -04:00
Robin Malfait
7720e16fa2 Skip calc() normalisation in nested theme() calls (#11705)
* add `calc` normalisation test cases using `theme()`

* ignore formatting in some known functions, such as `theme`

* update changelog
2023-10-23 15:24:08 -04:00
Robin Malfait
bfd042058d Improve normalisation of calc()-like functions (#11686)
* parse the `calc()`-like expressions and format them

* update changelog

* Add test case for double negatives

wanted to be sure this worked

---------

Co-authored-by: Jordan Pittman <jordan@cryptica.me>
2023-10-23 15:23:15 -04:00
Adam Wathan
42136e94ce
Run test suite against both engines (#10373)
* Run test suite against both engines

* make eslint happy

* only run `stable` tests on Node 12

* use normal expectation instead of snapshot file

When we run the tests only against `stable` (for node 12), then the
snapshots exists for the `Oxide` build. They are marked as `obsolete`
and will cause the `npm run test` script to fail. Sadly.

Inlined them for now, but ideally we make those tests more blackbox-y so
that we test that we get source maps and that we can map the sourcemap
back to the input files (without looking at the actual annotations).

* properly indent inline css

Co-authored-by: Adam Wathan <4323180+adamwathan@users.noreply.github.com>
Co-authored-by: Robin Malfait <malfait.robin@gmail.com>
2023-01-20 18:45:04 +01:00
Jordan Pittman
00af2e8947
Don’t add spaces around raw / that are preceded by numbers (#8688)
* Don’t add spaces around raw `/` that are preceded by numbers

* Update changelog
2022-06-20 10:49:55 -04:00
Dany Castillo
aad299cf90
Fix missing spaces around arithmetic operators (#8615)
* add tests for spaced around operators in CSS math functions

* fix CSS math functons besides calc not getting the love they deserve

* improve comment

* update changelog

* update changelog

Co-authored-by: Robin Malfait <malfait.robin@gmail.com>
2022-06-13 11:58:07 +02:00
Jordan Pittman
34c1e36c2a
Don’t split vars with numbers in them inside arbitrary values (#8091)
* Don’t mangle vars with numbers in them

* Update changelog
2022-04-13 09:31:10 -04:00