-
Notifications
You must be signed in to change notification settings - Fork 23.1k
Fix allowable properties for ::highlight pseudo-element #42866
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
base: main
Are you sure you want to change the base?
Fix allowable properties for ::highlight pseudo-element #42866
Conversation
|
Preview URLs (1 page) (comment last updated: 2026-01-26 13:48:51) |
estelle
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
made a suggestion.
if the -webkit- aren't in the spec, we don't need to mention them
| - {{CSSxRef("stroke")}}, {{CSSxRef("fill")}}, and {{CSSxRef("stroke-width")}} | ||
|
|
||
| Vendor-prefixed properties such as {{CSSxRef("-webkit-text-stroke-color")}} or {{CSSxRef("-webkit-text-fill-color")}} do not apply to highlight pseudo-elements. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| - {{CSSxRef("stroke")}}, {{CSSxRef("fill")}}, and {{CSSxRef("stroke-width")}} | |
| Vendor-prefixed properties such as {{CSSxRef("-webkit-text-stroke-color")}} or {{CSSxRef("-webkit-text-fill-color")}} do not apply to highlight pseudo-elements. | |
| - {{CSSxRef("stroke-color")}}, {{CSSxRef("fill-color")}}, and {{CSSxRef("stroke-width")}} | |
| - Custom properties ({{cssxref("--*"))}} |
|
Hi @estelle , I’ve removed the vendor-prefixed properties and kept only the spec-defined allowable properties. Please let me know if this looks good now. Thanks! |
I haven't tested them since they props only apply to svg, but the spec reads |
###Description
This PR corrects the “Allowable properties” section for the ::highlight pseudo-element.
It removes vendor-prefixed properties and updates the list to use the standard stroke-color, fill-color, and stroke-width properties.
###Motivation
The MDN page currently lists -webkit-text-* properties as allowable, which does not match the CSS specification.
This change aligns the documentation with the spec and prevents developers from relying on unsupported properties.
###Related issues and pull requests
Fixes #42863