Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow unquoted urls #227

Merged
merged 8 commits into from
Dec 4, 2024
Merged

allow unquoted urls #227

merged 8 commits into from
Dec 4, 2024

Conversation

jantimon
Copy link
Collaborator

@jantimon jantimon commented Dec 3, 2024

previously, the CSS parser would incorrectly interpret special characters (like colons) inside unquoted CSS function values as syntax separators. This caused the parser to break when encountering valid CSS like:

background: url(https://example.com/image.png);

this fix adds parenthesis depth tracking to properly handle all CSS function values (url, calc, rgb, etc.) regardless of whether they are quoted

Fixes #226

Copy link

changeset-bot bot commented Dec 3, 2024

🦋 Changeset detected

Latest commit: 085c907

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
yak-swc Patch
next-yak Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@jantimon jantimon requested a review from Mad-Kat December 3, 2024 14:31
Copy link

codspeed-hq bot commented Dec 3, 2024

CodSpeed Performance Report

Merging #227 will not alter performance

Comparing fix/unquoted-urls (085c907) with main (e58690b)

Summary

✅ 2 untouched benchmarks

@Mad-Kat
Copy link
Collaborator

Mad-Kat commented Dec 3, 2024

Would it make sense to add a fixture case for the bug that is addressed?

Mad-Kat
Mad-Kat previously approved these changes Dec 4, 2024
.changeset/itchy-brooms-kick.md Outdated Show resolved Hide resolved
@jantimon jantimon merged commit 3d6e505 into main Dec 4, 2024
8 checks passed
@jantimon jantimon deleted the fix/unquoted-urls branch December 4, 2024 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

CSS Parser fails to handle unquoted URLs in background properties
2 participants