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

Fix function-url-quotes autofix for multiple url() #6711

Merged
merged 8 commits into from Mar 14, 2023
Merged

Conversation

ybiquitous
Copy link
Member

Which issue, if any, is this issue related to?

Closes #6710

Is there anything in the PR that needs further explanation?

This pull request rewrites the rule implementation to use the postcss-value-parser AST node rather than string-based indexes.

@changeset-bot
Copy link

changeset-bot bot commented Mar 13, 2023

🦋 Changeset detected

Latest commit: 9a103c1

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

This PR includes changesets to release 1 package
Name Type
stylelint 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

package.json Outdated Show resolved Hide resolved
@jeddy3
Copy link
Member

jeddy3 commented Mar 14, 2023

If url-prefix() is only used by the deprecated @document, we can remove checking url-prefix() from the rule. It'd be a non-breaking change, making the rule more permissive.

@ybiquitous
Copy link
Member Author

@jeddy3 Thanks for the feedback. Indeed, when seeing the browser compatibility table of @document, it seems only outdated Firefox versions support url-prefix(), and so it seems safe to remove the function from the test cases.

@ybiquitous ybiquitous marked this pull request as ready for review March 14, 2023 13:40
Copy link
Member

@jeddy3 jeddy3 left a comment

Choose a reason for hiding this comment

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

Fantastic, thank you!

It's a nice refactor and fix.

@ybiquitous
Copy link
Member Author

Thanks for the quick review!

@ybiquitous ybiquitous merged commit 6d143c6 into main Mar 14, 2023
@ybiquitous ybiquitous deleted the issue-6710 branch March 14, 2023 13:56
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.

Fix function-url-quotes autofix for multiple url()
2 participants