Repository navigation
Conversation
Tighten selectors to avoid matching URLs in inline styles
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
@benniledl Thanks for the PR it would be great if you could update the PR description to follow the Gutenberg project's template as it will provide a better path to review, provide required context and in this particular case help evaluate alternative solutions e.g. #77476 |
|
I think this fix might still match css vars, so it'd be good to avoid that, as it's the main issue reported in #70211 |
|
As the approach in this PR doesn't solve the primary issue being reported. I'll close this in favour of alternative approaches already noted in this PR discussion. |
This change fixes an issue where the selector [style*="border-color"] was too broad and matched unintended cases.
On the WordCamp Europe site, an inline style contained a background image URL with border-color in the filename. This caused the rule to incorrectly apply borders, resulting in random borders appearing across the site.
The selector is now tightened to [style*="border-color:"] to ensure it only targets actual CSS declarations, not substrings inside URLs.
Related #75546
@aaronrobertshaw
AI Note: PR Title and Description written by AI