Skip to content

Conversation

@SURYAS1306
Copy link
Contributor

@SURYAS1306 SURYAS1306 commented Jan 22, 2026

###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

@SURYAS1306 SURYAS1306 requested a review from a team as a code owner January 22, 2026 12:11
@SURYAS1306 SURYAS1306 requested review from estelle and removed request for a team January 22, 2026 12:11
@github-actions github-actions bot added Content:CSS Cascading Style Sheets docs size/xs [PR only] 0-5 LoC changed labels Jan 22, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Jan 22, 2026

Preview URLs (1 page)

(comment last updated: 2026-01-26 13:48:51)

Copy link
Member

@estelle estelle left a 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

Comment on lines 23 to 25
- {{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.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
- {{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("--*"))}}

@SURYAS1306
Copy link
Contributor Author

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!

@estelle
Copy link
Member

estelle commented Jan 26, 2026

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 stroke-color and the pr has stroke. Also, the spec lists custom properties as supported props.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content:CSS Cascading Style Sheets docs size/xs [PR only] 0-5 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

::highlight() page mentions -webkit-* as allowable property, but spec doesn't mention these

2 participants