Closed Bug 1639664 Opened 4 months ago Closed 4 months ago

::first-letter/::first-line pseudo selector does not support opacity

Categories

(Core :: CSS Parsing and Computation, defect, P3)

76 Branch
defect

Tracking

()

RESOLVED FIXED
mozilla78
Tracking Status
firefox78 --- fixed

People

(Reporter: maclockard, Assigned: mats)

Details

Attachments

(2 files)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:76.0) Gecko/20100101 Firefox/76.0

Steps to reproduce:

Tried to use ::first-letter pseudo selector and an opacity attribute. See attached file for example.

Actual results:

The first letter's opacity it unaffected by the opacity attribute. It's still possible to change opacity, but only through the color attribute. Unfortunately, this workaround cannot be used in many cases when inheriting color.

Expected results:

Opacity should change.

Component: Untriaged → Layout
Product: Firefox → Core

Hmm, were opacity recently added to the ::first-letter/line specs? Seems odd that we'd miss such a thing...
https://drafts.csswg.org/css-pseudo-4/#first-letter-styling
Same for ::first-line btw:
https://drafts.csswg.org/css-pseudo-4/#first-line-styling

Anyway, should be an easy fix hopefully:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=ad90215977932bdec183fd8b99544ba9a1e5a99f

Assignee: nobody → mats
Severity: -- → S3
Status: UNCONFIRMED → ASSIGNED
Component: Layout → CSS Parsing and Computation
Ever confirmed: true
OS: Unspecified → All
Priority: -- → P3
Hardware: Unspecified → All
Summary: ::first-letter pseudo selector does not support opacity → ::first-letter/::first-line pseudo selector does not support opacity
Pushed by mpalmgren@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/b249a6de576d
Allow 'opacity' on ::first-letter/::first-line pseudos.  r=emilio
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/23736 for changes under testing/web-platform/tests

Thanks for the fast response! this is awesome

Upstream web-platform-tests status checks passed, PR will merge once commit reaches central.
Upstream PR merged by moz-wptsync-bot
Status: ASSIGNED → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla78
You need to log in before you can comment on or make changes to this bug.