Skip to content

oxfmt inserts a stray space before [index] in CSS theme() values #24334

Description

@maxsalven

oxfmt 0.58.0

In a .css file, oxfmt space-separates the [0] array index in a Tailwind theme() call (it seems to treat [0] like an attribute selector). The result is invalid — Tailwind then errors with 'fontSize.af-md [0]' does not exist.

Before:

p {
  font-size: theme(fontSize.af-md[0]);
}

After (oxfmt):

p {
  font-size: theme(fontSize.af-md [0]);
}

Metadata

Metadata

Assignees

Labels

A-formatter-prettier-diffArea - Formatter difference with PrettierF-lang-cssFormatter - oxc_formatter_css related

Type

Fields

Priority

None yet

Effort

None yet

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions