Closed Bug 1842175 Opened 2 years ago Closed 1 years ago

[Inactive CSS] Report ignored properties on ::first-letter pseudo-elements

Categories

(DevTools :: Inspector: Rules, enhancement, P3)

enhancement

Tracking

(firefox119 fixed)

RESOLVED FIXED
119 Branch
Tracking Status
firefox119 --- fixed

People

(Reporter: sebo, Assigned: sebo)

References

(Blocks 3 open bugs, )

Details

(Whiteboard: [devtools:relnote])

Attachments

(1 file)

The ::first-letter pseudo-element can only be styled by a limited set of properties. Those properties are:

  • all font properties
  • the color and opacity properties
  • all background properties
  • any typesetting properties that apply to inline elements
  • all text decoration properties
  • any inline layout properties that apply to inline elements
  • margin and padding properties
  • border properties and box-shadow
  • any other properties defined to apply to ::first-letter by their respective specifications

See https://drafts.csswg.org/css-pseudo-4/#first-letter-styling and https://developer.mozilla.org/en-US/docs/Web/CSS/::first-letter#allowable_properties.

Sebastian

Blocks: 1842181
Severity: -- → S3
Priority: -- → P3

Given that the spec. says this:

User agents may apply other properties as well. However, in no case may the application of such unlisted properties to ::first-letter change what first-letter text is represented by that ::first-letter.

I think it's better to not mark every property besides the ones listed in the initial comment as invalid but only content. The spec. is pretty vague what those properties are but I believe content is currently the only property that can change the contents of an element.

Sebastian

Assignee: nobody → sebastianzartner
Status: NEW → ASSIGNED
Pushed by sebastianzartner@gmail.com: https://hg.mozilla.org/integration/autoland/rev/df264f5ba50f [devtools] Handle ::first-letter pseudo-element's ignored properties in inactive CSS. r=devtools-reviewers,fluent-reviewers,flod,nchevobbe.
Status: ASSIGNED → RESOLVED
Closed: 1 years ago
Resolution: --- → FIXED
Target Milestone: --- → 119 Branch
Whiteboard: [devtools:relnote]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: