Skip to content

[css-syntax-3] non-ASCII ident code point might be breaking because it excludes the use of emojis in idents #8862

@romainmenke

Description

@romainmenke

As always, I might just have a bug :)

After implementing https://drafts.csswg.org/css-syntax/#non-ascii-ident-code-point I had a bunch of test failures because emojis are no longer valid in idents.

This works today in all browsers :

:root {
	--💅: hotpink;
}

body {
	background-color: var(--💅);
}

I don't think writing CSS like this is a good idea, but I know that we have had reports about it not working for people, so that is at least an indicator that someone did something like this.

postcss/postcss-custom-properties#237


If it is correct that these codepoints are no longer valid in idents it might be needed to check if this will break more than just a few experiments by people.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions