leaysgur
3d00a7635b
fix(formatter_css): keep comment inside important and simple-vars colon ( #26370 )
...
Follow up on #26337
Also, normalize `important` token with/without comments.
2026-09-07 01:33:14 +00:00
leaysgur
68e12abe2c
feat(formatter_css): follow the oxc-css-parser's acceptance line ( #26337 )
...
Fixes #26290 , #26291 .
Also, many changes to follow refined parser acceptance line.
---
CI will fail until parser version bumped, needs oxc-project/oxc-css-parser/pull/166
2026-09-07 01:33:14 +00:00
leaysgur
172ddb67dc
fix(formatter_css): keep a same-line line comment on its line ( #26321 )
...
Consistent output with other language formatters.
2026-09-04 07:14:53 +00:00
leaysgur
cafaf32de1
fix(formatter_css): never drop comments inside an at-rule prelude ( #26320 )
...
Fix missing comment bug.
2026-09-04 07:14:52 +00:00
leaysgur
534a0fe838
fix(formatter_css): keep a line comment on its comma's line ( #26319 )
...
e.g.
```scss
$my-map: (
"foo": 1, // Comment
"bar": 2, // Comment
);
```
should not be formatted:
```scss
$my-map: (
"foo": 1,
// Comment
"bar": 2, // Comment
);
```
2026-09-04 07:14:52 +00:00
leaysgur
99cfd7556e
fix(formatter_css): hide raw comment printing API, use strcut instead ( #26316 )
...
#26313 for CSS formatter. This also fixes some bugs.
2026-09-04 07:14:52 +00:00
leaysgur
2028896ab9
fix(formatter_css): preserve comments around SCSS/Less variable values ( #26276 )
...
```less
// input
@a: /* c */ 1;
// before
@a: 1;
// after
@a: /* c */ 1;
```
Comment should be preserved.
```scss
// input
$x: // c
1;
// before
$x:
// c1;
// after
$x: // c
1;
```
Content should be preserved.
2026-09-03 08:17:36 +00:00
leaysgur
b3c287a47d
fix(formatter_css): fix SCSS bracket list printing ( #26270 )
...
`$basic: [1, 2];` and `$basic: (1, 2);` should be formatted in the same way.
2026-09-03 08:17:35 +00:00
leaysgur
c7b57efc38
fix(formatter_css): print SCSS map consisntent with and without comment ( #26268 )
...
```scss
$no-comment: (
a: 1,
);
$with-block: (
/* c */ a: 1,
);
```
These should be formatted in the same way.
2026-09-03 08:17:34 +00:00
leaysgur
4fabdcca11
docs(formatter,formatter_css,formatter_graphql,formatter_yaml): update DIVERGENCES.md ( #26267 )
...
Update each document following #26266 policy.
2026-09-03 08:17:34 +00:00
leaysgur
063e2b6249
fix(formatter_css): preserve trailing comma in single-item scss lists ( #26245 )
...
Keep these as-is.
```scss
foo: ("a",);
$x: "a",;
```
Even if they consist of a single element, these are still lists, and if the commas are removed, their type changes.
And also fixed inconsistent comment printing.
2026-09-03 08:17:33 +00:00
leaysgur
57e8e22483
fix(formatter_css): space a folded sign after a call in Less operations ( #26134 )
...
Follow up on #26132 .
By that change, Less is also possible to format binary operation like SCSS.
2026-08-27 07:49:30 +00:00
leaysgur
0e734cc7ae
test(formatter_css): pin signed-value parser fixes from oxc-css-parser 0.0.12 ( #26132 )
...
Bump parser and pin fixed by https://github.com/oxc-project/oxc-css-parser/pull/158
2026-08-27 07:49:30 +00:00
leaysgur
f94b22296c
test(formatter,formatter_css,formatter_json,formatter_yaml): restore coverage lost in fixture consolidation ( #26129 )
...
- Restore wrongly consolidated fixtures
- State new fixtures policy and apply
- Check `endOfLine` option and output at test harness level
2026-08-27 06:12:52 +00:00
leaysgur
181953b92d
docs(oxfmt,formatter_core,formatter,formatter_yaml,formatter_css,formatter_graphql): extract DIVERGENCES.md out from AGENTS.md ( #26121 )
...
- Extract "known divergences" section from `AGENTS.md` to explicit `DIVERGENCES.md` with code example
- Update all anchors
- Add missing pinned fixtures
2026-08-27 05:33:58 +00:00