KEMBAR78
[css-highlight-api] triggering restyling/repainting · Issue #4596 · w3c/csswg-drafts · GitHub
Skip to content

[css-highlight-api] triggering restyling/repainting #4596

@frivoal

Description

@frivoal

The properties controlled by the ::highlight() pseudo cannot affect layout, so there's not going to be a full reflow when something change, but they can still cause visual changes, so we need to be clear about when a re-computation of styles and a repaint happen.

In addition to DOM changes that would cause a restyling anyway, the following can cause a need for restyling/repainting:

  • adding or removing a HighlightRangeGroup to CSS.highlights
  • adding or removing a range to a HighlightRangeGroup in CSS.highlights
  • Changing the boundary points of a range in a HighlightRangeGroup in CSS.highlights
  • Changing the priority of a HighlightRangeGroup in CSS.highlights
  • Changing the style property of a HighlightRangeGroup in CSS.highlights

Are any or all of things things synchronously triggering a restyle/repaint? Probably not, but what should the spec say?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions