Skip to content

Fix CSS encoding to handle non-ASCII characters#49

Merged
backspace merged 4 commits intomainfrom
unicode-in-css-cs-8484
Apr 28, 2025
Merged

Fix CSS encoding to handle non-ASCII characters#49
backspace merged 4 commits intomainfrom
unicode-in-css-cs-8484

Conversation

@backspace
Copy link
Copy Markdown
Contributor

@backspace backspace commented Apr 28, 2025

Scoped CSS like this:

li:before {
  content: "✓";
}

was previously causing inscrutable errors like this:

Cannot set property message of  which has only a getter

It’s because btoa can’t handle non-ASCII characters like ✓, so this uses more robust encoding.

@backspace backspace added the bug Something isn't working label Apr 28, 2025
@backspace backspace requested a review from lukemelia April 28, 2025 19:49
Comment thread glimmer-scoped-css/src/encoding.ts Outdated
Co-authored-by: Luke Melia <luke@lukemelia.com>
@backspace backspace merged commit bb0f2fd into main Apr 28, 2025
7 of 10 checks passed
@github-actions github-actions bot mentioned this pull request Apr 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants