RESOLVED FIXED 226175
Add modal dialog UA styles
https://bugs.webkit.org/show_bug.cgi?id=226175
Summary Add modal dialog UA styles
Tim Nguyen (:ntim)
Reported 2021-05-24 07:00:19 PDT
Bug 226169 adds the non-modal dialog element UA styles, but the modal dialog styles are different: https://html.spec.whatwg.org/#flow-content-3 """ The dialog element, when its is modal flag is true, is expected to act as if it had a user-agent-level style sheet rule setting the following properties: 'position' property to 'fixed' 'overflow' property to 'auto' 'inset-block-start' property to '0' 'inset-block-end' property to '0' 'max-width' property to 'calc(100% - 6px - 2em)' 'max-height' property to 'calc(100% - 6px - 2em)' """ This needs an internal pseudo selector like ::-internal-modal-dialog to be able to apply those styles from the UA stylesheet.
Attachments
Patch (8.63 KB, patch)
2021-06-30 04:33 PDT, Tim Nguyen (:ntim)
no flags
Patch (29.19 KB, patch)
2021-06-30 07:37 PDT, Tim Nguyen (:ntim)
no flags
Patch (29.85 KB, patch)
2021-06-30 09:27 PDT, Tim Nguyen (:ntim)
no flags
Radar WebKit Bug Importer
Comment 1 2021-05-31 07:01:15 PDT
Tim Nguyen (:ntim)
Comment 2 2021-06-30 04:33:28 PDT
Tim Nguyen (:ntim)
Comment 3 2021-06-30 07:37:00 PDT
Simon Fraser (smfr)
Comment 4 2021-06-30 09:16:49 PDT
Comment on attachment 432591 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=432591&action=review > Source/WebCore/css/dialog.css:25 > + max-width: calc(100% - 6px - 2em); > + max-height: calc(100% - 6px - 2em); Where did these come from?
Tim Nguyen (:ntim)
Comment 5 2021-06-30 09:27:31 PDT
Tim Nguyen (:ntim)
Comment 6 2021-06-30 09:28:30 PDT
(In reply to Simon Fraser (smfr) from comment #4) > Comment on attachment 432591 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=432591&action=review > > > Source/WebCore/css/dialog.css:25 > > + max-width: calc(100% - 6px - 2em); > > + max-height: calc(100% - 6px - 2em); > > Where did these come from? As wonky as they are, they are actually from the spec, see comment 0.
Tim Nguyen (:ntim)
Comment 7 2021-06-30 09:32:10 PDT
Note You need to log in before you can comment on or make changes to this bug.