Skip to content

📝 parser error with forward slash in tailwind directive #8897

@mpeg

Description

@mpeg

Environment information

A forward slash within a @utility tailwind directive name throws an error when parsing it, as in the repro

Prettier is able to parse this kind of css, while biome throws an expected `{` but instead found `/` error

While the css is not valid, tailwind automatically escapes it, incidentally there is also an issue where tailwind doesn't allow the pre-escaped utility name which would work with biome. Still, maybe this is worth a fix on both sides

Configuration

Playground link

https://biomejs.dev/playground/?code=QAB1AHQAaQBsAGkAdAB5ACAAYQAvAGIAIAB7AAoAIAAgAGMAbwBsAG8AcgA6ACAAcgBlAGQAOwAKAH0A&language=css

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