Skip to content

📎 CSS Parser: Add support for the typed attr function #6183

@Treycos

Description

@Treycos

Context

The CSS attr function is currently not fully supported by the Biome parser.

Image

The current Baseline status of this function is somewhat misleading, as it recently evolved to add the <attr-type> parameter.

This syntax is unusual is CSS.

attr(data-size type(<length> | <percentage>), 0px)

Even VSCode struggles to apply syntax highlighting correctly.

Support is gradually being added in all major browsers following interop 2024
https://developer.mozilla.org/en-US/docs/Web/CSS/attr#browser_compatibility
web-platform-tests/interop#521

Metadata

Metadata

Assignees

No one assigned

    Labels

    L-CSSLanguage: CSSS-EnhancementStatus: Improve an existing feature

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions