Closed Bug 1908279 Opened 2 months ago Closed 1 month ago

@scope :scope::part() doesn't work

Categories

(Core :: CSS Parsing and Computation, defect)

Firefox 130
defect

Tracking

()

RESOLVED FIXED
131 Branch
Tracking Status
firefox131 --- fixed

People

(Reporter: 709922234, Assigned: dshin)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:130.0) Gecko/20100101 Firefox/130.0

Steps to reproduce:

https://codepen.io/mantou132/pen/rNEOXKV

Actual results:

"Blue" not blue

Expected results:

"Blue" is blue

Component: Untriaged → CSS Parsing and Computation
Product: Firefox → Core

Strangely, in another example, :scope::part seems to work, but it fails with multiple scopes:

  • visit https://examples.gemjs.org
  • navigator to "Console" from side bar
  • navigator to "Client Pagination" from new page side bar
  • click table header "No" cell

The first :scope::part() style seems to be applied to other elements, bug https://codepen.io/mantou132/pen/pomaOjB work.

Attached image 20240717-104211.jpg

Can confirm that Nightly does not show colors, and Chrome does.
ni? from :dshin.

Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(dshin)

Missing-but-implied bit of STR: set about:config layout.css.at-scope.enabled to true to enable this feature. (That pref defaults to false for now -- reference: https://searchfox.org/mozilla-central/rev/8c6edfe25c094e032a27722ef30f69555f556bf8/modules/libpref/init/StaticPrefList.yaml#9095-9098 )

With that, Nightly renders the linked codepen with the word "Red" written in red, but the word "Blue" is written in a black (default) color, as described in comment 0.

Blocks: @scope
Severity: -- → S3
Summary: @scope :scope::part() not work → `@scope :scope::part()` doesn't work
Summary: `@scope :scope::part()` doesn't work → @scope :scope::part() doesn't work
Assignee: nobody → dshin
Flags: needinfo?(dshin)
Pushed by dshin@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/13085ea1774d
Let the @scope root search cross the shadow boundary if ::part selector is used. r=firefox-style-system-reviewers,emilio
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/47487 for changes under testing/web-platform/tests
Status: NEW → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 131 Branch
Upstream PR merged by moz-wptsync-bot
See Also: → 1912241
QA Whiteboard: [qa-131b-p2]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: