Closed Bug 1842174 Opened 1 year ago Closed 1 year ago

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

Categories

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

enhancement

Tracking

(firefox118 fixed)

RESOLVED FIXED
118 Branch
Tracking Status
firefox118 --- fixed

People

(Reporter: sebo, Assigned: sebo)

References

(Blocks 3 open bugs, )

Details

(Keywords: dev-doc-needed)

Attachments

(1 file, 1 obsolete file)

The ::first-line 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
  • the ruby-position property
  • any inline layout properties that apply to inline elements
  • any other properties defined to apply to ::first-line by their respective specifications

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

Sebastian

Summary: [Inactive CSS] Report ignored properties on `::first-line` pseudo-elements → [Inactive CSS] Report ignored properties on ::first-line pseudo-elements
Blocks: 1842181
Severity: -- → S3
Priority: -- → P3

Note that some of the accepted properties like 'margin-trim' are not yet supported by Gecko. Some are supported by the engine but not yet for the ::first-line pseudo-element like 'padding'.
According to the specification, those are valid within ::first-line, though. See https://www.w3.org/TR/css-pseudo-4/#first-line-styling and its referenced specifications as well as https://www.w3.org/TR/css-box-4/#placement. There might even be other properties supported, though the specs are not totally clear about that.

Assignee: nobody → sebastianzartner
Status: NEW → ASSIGNED
Attachment #9348752 - Attachment is obsolete: true
Pushed by sebastianzartner@gmail.com: https://hg.mozilla.org/integration/autoland/rev/a6e6cc51fc00 [devtools] Handle ::first-line pseudo-element's ignored properties in inactive CSS. r=devtools-reviewers,fluent-reviewers,flod,jdescottes.

For reference, Julian pointed out that the spec. says this:

User agents may apply other properties as well except for the following excluded properties:

  • writing-mode
  • direction
  • text-orientation

Therefore, we now only mark those three properties as inactive instead of every property besides the ones listed in the initial comment.

Sebastian

Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 118 Branch

This might be worth being mentioned in https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Releases/118 together with the changes of bug 1583912 and bug 1583906.

Sebastian

Keywords: dev-doc-needed
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: