Skip to content

(CSS) custom property --_margin-top: 1rem, top gets wrongly highlighted #3823

@miragecraft

Description

@miragecraft

Describe the issue

In CSS, custom property such as --_margin-top: 1rem, top gets wrongly highlighted

It seems to be caused by some kind of interaction between the underscore and hyphen.

Which language seems to have the issue?

CSS, I'm using language="css" and NOT using auto-detect.

Sample Code to Reproduce

.example {
    --_margin-top: 1rem;
}

Expected behavior

--_margin-top should be treated as an atomic unit of text for highlighting purposes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions