Closed Bug 1768535 Opened 2 years ago Closed 2 years ago

Implement CSS :modal pseudo-class

Categories

(Core :: CSS Parsing and Computation, task)

task

Tracking

()

RESOLVED FIXED
103 Branch
Tracking Status
firefox103 --- fixed

People

(Reporter: ntim, Assigned: tlouw, Mentored)

References

Details

(Keywords: dev-doc-complete, good-first-bug, Whiteboard: [lang=rust] [lang=cpp])

Attachments

(1 file)

Should be a matter of renaming :-moz-modal-dialog and exposing it.

See: https://github.com/w3c/csswg-drafts/issues/6965#issuecomment-1118033655

Tests added by: https://github.com/web-platform-tests/wpt/pull/33999

Mentor: emilio
Keywords: good-first-bug
Whiteboard: [lang=rust] [lang=cpp]
Keywords: dev-doc-needed

The thing to rename would be the :-moz-topmost-modal pseudo-class now.

(In reply to Emilio Cobos Álvarez (:emilio) from comment #1)

The thing to rename would be the :-moz-topmost-modal pseudo-class now.

Are you sure? The spec says every modal element needs to match, not just the topmost one.

From https://drafts.csswg.org/selectors-4/#modal-state :

Multiple elements can be '':modal'' simultaneously, with only one of them active (able to receive input).

Oh, d'oh, you're right, thanks!

Assignee: nobody → tlouw
Status: NEW → ASSIGNED
Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/266c6cbea6bd
Rename :-moz-modal-dialog to :modal r=emilio
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 103 Branch

Doc for this new pseudo class is now available: https://developer.mozilla.org/en-US/docs/Web/CSS/:modal
Other related updates like browser compatibility table and release notes can be tracked in this doc issue tracker: https://github.com/mdn/content/issues/17470

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: