Closed Bug 1717246 Opened 4 years ago Closed 2 months ago

::marker shouldn't inherit text-align-last

Categories

(Core :: Layout: Generated Content, Lists, and Counters, defect, P4)

defect

Tracking

()

RESOLVED FIXED
145 Branch
Tracking Status
firefox145 --- fixed

People

(Reporter: Oriol, Assigned: Oriol)

References

Details

Attachments

(2 files)

Attached file marker-testcase.html

https://searchfox.org/mozilla-central/rev/f9c007f93321f02889f7495048c6b364ae71997c/layout/style/res/ua.css#135

In UA origin you are already setting

::marker {
  text-align: end;
}

However, against the spec, text-align is not a shorthand of text-align-last. So I think you should also reset text-align-last in UA origin, like I did in Chromium.

See this testcase:

<!DOCTYPE html>
<ol style="list-style: '[foo\a ]'; width: max-content">
  <li style="text-align-last: start">text</li>
  <li style="text-align-last: end">text</li>
</ol>

The text-align-last should only affect the text inside the list item, not the ::marker.

But the ] in the 2nd line of the marker has a different position in each list item.

Assignee: nobody → mats
Severity: -- → S4
OS: Unspecified → All
Priority: -- → P4
Hardware: Unspecified → All

The bug assignee is inactive on Bugzilla, so the assignee is being reset.

Assignee: MatsPalmgren_bugz → nobody

text-align was already set to end, but text-align-last isn't
implemented as a longhand, so it needs the same treatment.

In practice this prevents the ::marker from inheriting the value from
its originating element, since text-align-last shouldn't apply
according to https://drafts.csswg.org/css-lists/#marker-properties

Assignee: nobody → oriol-bugzilla
Status: NEW → ASSIGNED
Pushed by oriol-bugzilla@hotmail.com: https://github.com/mozilla-firefox/firefox/commit/3878d8bd5c02 https://hg.mozilla.org/integration/autoland/rev/49c9d75ce1a7 Set `text-align-last: end` on ::marker. r=emilio,firefox-style-system-reviewers,dshin
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 145 Branch
Blocks: 1663076
QA Whiteboard: [qa-triage-done-c146/b145]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: