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 adjacent forward slashes in plain CSS expressions #2190

Merged
merged 2 commits into from
Mar 12, 2024
Merged

Conversation

nex3
Copy link
Contributor

@nex3 nex3 commented Mar 7, 2024

@nex3 nex3 requested a review from jathak March 7, 2024 23:38
@@ -32,7 +32,9 @@ class CssParser extends ScssParser {

CssParser(super.contents, {super.url, super.logger});

void silentComment() {
bool silentComment() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason why we allow silent comments at all when parsing plain CSS?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't, but we do want to throw an explicit error when we encounter them. This is particularly true because historically LibSass parsed .css files as SCSS and some frameworks took advantage of this, so there are definitely real world cases where the user needs a better error than whatever parsing failure they'd get in plain CSS.

@nex3 nex3 merged commit 6e2d637 into main Mar 12, 2024
34 checks passed
@nex3 nex3 deleted the adjacent-slashes branch March 12, 2024 21:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants