Skip to content

🐛 px-* breaks tailwind parsing #8708

@sean-risr

Description

@sean-risr

Environment information

Details
CLI:
  Version:                      2.3.11
  Color support:                true

Platform:
  CPU Architecture:             aarch64
  OS:                           macos

Environment:
  BIOME_LOG_PATH:               unset
  BIOME_LOG_PREFIX_NAME:        unset
  BIOME_CONFIG_PATH:            unset
  BIOME_THREADS:                unset
  NO_COLOR:                     unset
  TERM:                         xterm-256color
  JS_RUNTIME_VERSION:           v25.2.1
  JS_RUNTIME_NAME:              node
  NODE_PACKAGE_MANAGER:         npm/11.6.2

Biome Configuration:
  Status:                       Loaded successfully
  Path:                         biome.json
  Formatter enabled:            true
  Linter enabled:               true
  Assist enabled:               true
  VCS enabled:                  true
  HTML full support enabled:    unset

Workspace:
  Open Documents:               0

What happened?

When creating a utility with a parameter (-*) in Tailwind v4, Biome's parser reports the error:

  ✖ expected `{` but instead found `-`

    160 │ 
  > 161 │ @utility px-* {
        │            ^
    162 │       padding-right: --value(--s-x-*);
    163 │       padding-left: --value(--s-x-*);
    164 | }

Escaping the characters with backslashes stops Biome from reporting the error, but breaks Tailwind.

Code:

@theme {
	--w-topic-card: 20rem;
}

/* Define utilities to match custom values */
@utility w-* {
	width: --value(--w-*);
}

I've added the tailwindDirectives to my biome.json file without success.

Expected result

Should not report an error

Code of Conduct

  • I agree to follow Biome's Code of Conduct

Metadata

Metadata

Assignees

Labels

A-ParserArea: parserL-CSSLanguage: CSS and super languagesS-Bug-confirmedStatus: report has been confirmed as a valid bug

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions