From 93cf3199011bac191007558ccf5e56841a7301d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20Poduszl=C3=B3?= <14854048+kripod@users.noreply.github.com> Date: Fri, 17 May 2024 19:22:16 +0200 Subject: [PATCH] chore: update UA sheets --- ua-sheets/chrome.css | 1127 ++++++++++++++++++++++++++++------------- ua-sheets/firefox.css | 184 ++++--- 2 files changed, 864 insertions(+), 447 deletions(-) diff --git a/ua-sheets/chrome.css b/ua-sheets/chrome.css index 4cefcc2..ca8481e 100644 --- a/ua-sheets/chrome.css +++ b/ua-sheets/chrome.css @@ -24,39 +24,18 @@ @namespace "http://www.w3.org/1999/xhtml"; html { - display: block -} - -/* children of the element all have display:none */ -head { - display: none -} - -meta { - display: none -} - -title { - display: none -} - -link { - display: none -} - -style { - display: none + display: block; } -script { - display: none +:root { + view-transition-name: root; } /* generic block-level elements */ body { display: block; - margin: 8px + margin: 8px; } body:-webkit-full-page-media { @@ -65,26 +44,23 @@ body:-webkit-full-page-media { p { display: block; - -webkit-margin-before: 1__qem; - -webkit-margin-after: 1__qem; - -webkit-margin-start: 0; - -webkit-margin-end: 0; + margin-block-start: 1__qem; + margin-block-end: 1__qem; + margin-inline-start: 0; + margin-inline-end: 0; } div { display: block } -layer { - display: block -} - -article, aside, footer, header, hgroup, main, nav, section { +article, aside, footer, header, hgroup, main, nav, search, section { display: block } marquee { display: inline-block; + width: -webkit-fill-available; } address { @@ -93,10 +69,10 @@ address { blockquote { display: block; - -webkit-margin-before: 1__qem; - -webkit-margin-after: 1em; - -webkit-margin-start: 40px; - -webkit-margin-end: 40px; + margin-block-start: 1__qem; + margin-block-end: 1em; + margin-inline-start: 40px; + margin-inline-end: 40px; } figcaption { @@ -105,10 +81,10 @@ figcaption { figure { display: block; - -webkit-margin-before: 1em; - -webkit-margin-after: 1em; - -webkit-margin-start: 40px; - -webkit-margin-end: 40px; + margin-block-start: 1em; + margin-block-end: 1em; + margin-inline-start: 40px; + margin-inline-end: 40px; } q { @@ -131,10 +107,11 @@ center { hr { display: block; - -webkit-margin-before: 0.5em; - -webkit-margin-after: 0.5em; - -webkit-margin-start: auto; - -webkit-margin-end: auto; + overflow: hidden; + margin-block-start: 0.5em; + margin-block-end: 0.5em; + margin-inline-start: auto; + margin-inline-end: auto; border-style: inset; border-width: 1px } @@ -147,94 +124,130 @@ video { object-fit: contain; } +video:-webkit-full-page-media { + margin: auto; + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + max-height: 100%; + max-width: 100%; +} + +audio:not([controls]) { + display: none !important; +} + +/** TODO(crbug.com/985623): Remove these hard-coded audio tag size. + * This fixed audio tag width/height leads to fail the wpt tests below. + * crbug.com/955170 external/wpt/css/css-contain/contain-size-replaced-003a.html + * crbug.com/955163 external/wpt/css/css-contain/contain-size-replaced-003b.html + * crbug.com/955163 external/wpt/css/css-contain/contain-size-replaced-003c.html + */ +audio { + width: 300px; + height: 54px; +} + +video, canvas, img { + overflow: clip; + overflow-clip-margin: content-box; +} + +iframe, embed, object, fencedframe { + overflow: clip !important; + overflow-clip-margin: content-box !important; +} + /* heading elements */ h1 { display: block; font-size: 2em; - -webkit-margin-before: 0.67__qem; - -webkit-margin-after: 0.67em; - -webkit-margin-start: 0; - -webkit-margin-end: 0; + margin-block-start: 0.67__qem; + margin-block-end: 0.67em; + margin-inline-start: 0; + margin-inline-end: 0; font-weight: bold } :-webkit-any(article,aside,nav,section) h1 { font-size: 1.5em; - -webkit-margin-before: 0.83__qem; - -webkit-margin-after: 0.83em; + margin-block-start: 0.83__qem; + margin-block-end: 0.83em; } :-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) h1 { font-size: 1.17em; - -webkit-margin-before: 1__qem; - -webkit-margin-after: 1em; + margin-block-start: 1__qem; + margin-block-end: 1em; } :-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) h1 { font-size: 1.00em; - -webkit-margin-before: 1.33__qem; - -webkit-margin-after: 1.33em; + margin-block-start: 1.33__qem; + margin-block-end: 1.33em; } :-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) h1 { font-size: .83em; - -webkit-margin-before: 1.67__qem; - -webkit-margin-after: 1.67em; + margin-block-start: 1.67__qem; + margin-block-end: 1.67em; } :-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) h1 { font-size: .67em; - -webkit-margin-before: 2.33__qem; - -webkit-margin-after: 2.33em; + margin-block-start: 2.33__qem; + margin-block-end: 2.33em; } h2 { display: block; font-size: 1.5em; - -webkit-margin-before: 0.83__qem; - -webkit-margin-after: 0.83em; - -webkit-margin-start: 0; - -webkit-margin-end: 0; + margin-block-start: 0.83__qem; + margin-block-end: 0.83em; + margin-inline-start: 0; + margin-inline-end: 0; font-weight: bold } h3 { display: block; font-size: 1.17em; - -webkit-margin-before: 1__qem; - -webkit-margin-after: 1em; - -webkit-margin-start: 0; - -webkit-margin-end: 0; + margin-block-start: 1__qem; + margin-block-end: 1em; + margin-inline-start: 0; + margin-inline-end: 0; font-weight: bold } h4 { display: block; - -webkit-margin-before: 1.33__qem; - -webkit-margin-after: 1.33em; - -webkit-margin-start: 0; - -webkit-margin-end: 0; + margin-block-start: 1.33__qem; + margin-block-end: 1.33em; + margin-inline-start: 0; + margin-inline-end: 0; font-weight: bold } h5 { display: block; font-size: .83em; - -webkit-margin-before: 1.67__qem; - -webkit-margin-after: 1.67em; - -webkit-margin-start: 0; - -webkit-margin-end: 0; + margin-block-start: 1.67__qem; + margin-block-end: 1.67em; + margin-inline-start: 0; + margin-inline-end: 0; font-weight: bold } h6 { display: block; font-size: .67em; - -webkit-margin-before: 2.33__qem; - -webkit-margin-after: 2.33em; - -webkit-margin-start: 0; - -webkit-margin-end: 0; + margin-block-start: 2.33__qem; + margin-block-end: 2.33em; + margin-inline-start: 0; + margin-inline-end: 0; font-weight: bold } @@ -244,7 +257,9 @@ table { display: table; border-collapse: separate; border-spacing: 2px; - border-color: gray + border-color: gray; + box-sizing: border-box; + text-indent: initial } thead { @@ -286,11 +301,19 @@ tr { td, th { display: table-cell; - vertical-align: inherit + vertical-align: inherit; +} + +/* When the td/th are inside a table (the normal case), the padding is taken + care of by HTMLTableCellElement::AdditionalPresentationAttributeStyle(). */ +td:not(table td), +th:not(table th) { + padding: 1px; } th { - font-weight: bold + font-weight: bold; + text-align: -internal-center } caption { @@ -303,21 +326,21 @@ caption { ul, menu, dir { display: block; list-style-type: disc; - -webkit-margin-before: 1__qem; - -webkit-margin-after: 1em; - -webkit-margin-start: 0; - -webkit-margin-end: 0; - -webkit-padding-start: 40px + margin-block-start: 1__qem; + margin-block-end: 1em; + margin-inline-start: 0; + margin-inline-end: 0; + padding-inline-start: 40px } ol { display: block; list-style-type: decimal; - -webkit-margin-before: 1__qem; - -webkit-margin-after: 1em; - -webkit-margin-start: 0; - -webkit-margin-end: 0; - -webkit-padding-start: 40px + margin-block-start: 1__qem; + margin-block-end: 1em; + margin-inline-start: 0; + margin-inline-end: 0; + padding-inline-start: 40px } li { @@ -335,15 +358,15 @@ ol ol ul, ol ul ul, ul ol ul, ul ul ul { dd { display: block; - -webkit-margin-start: 40px + margin-inline-start: 40px } dl { display: block; - -webkit-margin-before: 1__qem; - -webkit-margin-after: 1em; - -webkit-margin-start: 0; - -webkit-margin-end: 0; + margin-block-start: 1__qem; + margin-block-end: 1em; + margin-inline-start: 0; + margin-inline-end: 0; } dt { @@ -351,8 +374,8 @@ dt { } ol ul, ul ol, ul ul, ol ol { - -webkit-margin-before: 0; - -webkit-margin-after: 0 + margin-block-start: 0; + margin-block-end: 0 } /* form elements */ @@ -362,43 +385,43 @@ form { margin-top: 0__qem; } +:-webkit-any(table, thead, tbody, tfoot, tr) > form:-internal-is-html { + display: none !important; +} + label { cursor: default; } legend { display: block; - -webkit-padding-start: 2px; - -webkit-padding-end: 2px; + padding-inline-start: 2px; + padding-inline-end: 2px; border: none } fieldset { display: block; - -webkit-margin-start: 2px; - -webkit-margin-end: 2px; - -webkit-padding-before: 0.35em; - -webkit-padding-start: 0.75em; - -webkit-padding-end: 0.75em; - -webkit-padding-after: 0.625em; - border: 2px groove ThreeDFace; - min-width: -webkit-min-content; + margin-inline-start: 2px; + margin-inline-end: 2px; + padding-block-start: 0.35em; + padding-inline-start: 0.75em; + padding-inline-end: 0.75em; + padding-block-end: 0.625em; + border: 2px groove #C0C0C0; + min-inline-size: min-content; } button { - -webkit-appearance: button; -} - -/* Form controls don't go vertical. */ -input, textarea, keygen, select, button, meter, progress { - -webkit-writing-mode: horizontal-tb !important; + appearance: auto; + -internal-align-content-block: center; } -input, textarea, keygen, select, button { +input, textarea, select, button { margin: 0__qem; font: -webkit-small-control; text-rendering: auto; /* FIXME: Remove when tabs work with optimizeLegibility. */ - color: initial; + color: FieldText; letter-spacing: normal; word-spacing: normal; line-height: normal; @@ -409,42 +432,53 @@ input, textarea, keygen, select, button { text-align: start; } -input[type="hidden" i] { - display: none +textarea { + appearance: auto; + border: 1px solid light-dark(#767676, #858585); + column-count: initial !important; + -webkit-rtl-ordering: logical; + resize: -internal-textarea-auto; + cursor: text; + padding: 2px; + white-space: pre-wrap; + word-wrap: break-word; + background-color: Field; + font-family: monospace; } input { - -webkit-appearance: textfield; - padding: 1px; - background-color: white; - border: 2px inset; + appearance: auto; + padding:1px 0; + border: 2px inset light-dark(#767676, #858585); -webkit-rtl-ordering: logical; - -webkit-user-select: text; - cursor: auto; + cursor: text; + background-color: Field; +} + +input:not([type="file" i], [type="image" i], [type="checkbox" i], [type="radio" i]) { + -internal-align-content-block: center; } input[type="search" i] { - -webkit-appearance: searchfield; + appearance: auto; box-sizing: border-box; } input::-webkit-textfield-decoration-container { - display: flex; + display: flex !important; align-items: center; -webkit-user-modify: read-only !important; content: none !important; -} - -input[type="search" i]::-webkit-textfield-decoration-container { - direction: ltr; + writing-mode: inherit !important; } input::-webkit-clear-button { - -webkit-appearance: searchfield-cancel-button; + appearance: auto; display: inline-block; + cursor: default; flex: none; -webkit-user-modify: read-only !important; - -webkit-margin-start: 2px; + margin-inline-start: 2px; opacity: 0; pointer-events: none; } @@ -455,13 +489,16 @@ input:enabled:read-write:-webkit-any(:focus,:hover)::-webkit-clear-button { } input[type="search" i]::-webkit-search-cancel-button { - -webkit-appearance: searchfield-cancel-button; + appearance: auto; display: block; + cursor: default; flex: none; -webkit-user-modify: read-only !important; - -webkit-margin-start: 1px; + margin-inline-start: 1px; + margin-right: 3px; opacity: 0; pointer-events: none; + user-select: none !important; } input[type="search" i]:enabled:read-write:-webkit-any(:focus,:hover)::-webkit-search-cancel-button { @@ -469,31 +506,32 @@ input[type="search" i]:enabled:read-write:-webkit-any(:focus,:hover)::-webkit-se pointer-events: auto; } -input[type="search" i]::-webkit-search-decoration { - -webkit-appearance: searchfield-decoration; - display: block; - flex: none; - -webkit-user-modify: read-only !important; - -webkit-align-self: flex-start; - margin: auto 0; +input[type="search" i]::-webkit-search-results-decoration { + margin: auto 3px auto 2px; } -input[type="search" i]::-webkit-search-results-decoration { - -webkit-appearance: searchfield-results-decoration; - display: block; - flex: none; - -webkit-user-modify: read-only !important; - -webkit-align-self: flex-start; - margin: auto 0; +input, +input[type="email" i], +input[type="number" i], +input[type="password" i], +input[type="search" i], +input[type="tel" i], +input[type="text" i], +input[type="url" i] { + padding-block: 1px; + padding-inline: 2px; +} + +input[type="tel" i] { + direction: ltr; } input::-webkit-inner-spin-button { - -webkit-appearance: inner-spin-button; + appearance: auto; display: inline-block; cursor: default; flex: none; align-self: stretch; - -webkit-user-select: none; -webkit-user-modify: read-only !important; opacity: 0; pointer-events: none; @@ -504,134 +542,228 @@ input:enabled:read-write:-webkit-any(:focus,:hover)::-webkit-inner-spin-button { pointer-events: auto; } -keygen, select { - border-radius: 5px; -} - -keygen::-webkit-keygen-select { - margin: 0px; -} - -textarea { - -webkit-appearance: textarea; - background-color: white; - border: 1px solid; - -webkit-rtl-ordering: logical; - -webkit-user-select: text; - flex-direction: column; - resize: auto; - cursor: auto; - padding: 2px; - white-space: pre-wrap; - word-wrap: break-word; -} - ::-webkit-input-placeholder { -webkit-text-security: none; - color: darkGray; + color: #757575; + direction: inherit !important; pointer-events: none !important; + text-orientation: inherit !important; + writing-mode: inherit !important; } input::-webkit-input-placeholder { + text-overflow: inherit; + line-height: initial !important; white-space: pre; word-wrap: normal; overflow: hidden; -webkit-user-modify: read-only !important; } +input::-internal-input-suggested { + text-overflow: inherit; + white-space: nowrap; + overflow: hidden; +} + +input::-internal-input-suggested, +textarea::-internal-input-suggested { + font: -webkit-small-control !important; + /* -webkit-small-control does not pin the font-feature-settings and we want + previews to look consistent. */ + font-feature-settings: normal !important; + /* Prevent that overflow affects the scrollable area. Without this, + LayoutBox::*Scroll{Height,Width}() may determine the scroll width/height + from the scrollable area instead of from the overrides in + LayoutTextControl{Single,Multi}Line::Scroll{Height,Width}(). */ + overflow: hidden !important; + overflow-anchor: none; +} + +textarea::-internal-input-suggested { + font-family: monospace !important; +} + input[type="password" i] { -webkit-text-security: disc !important; } +input[type="password" i]::-internal-input-suggested:not(.reveal-password) { + -webkit-text-security: disc !important; +} + +input[type="password" i]::-internal-input-suggested.reveal-password { + -webkit-text-security: none; +} + +input[type="password" i]::-internal-input-suggested.fade-out-password { + width: fit-content; + -webkit-mask: linear-gradient(to right, #000 50%, #0000); + mask: linear-gradient(to right, #000 50%, #0000); +} + +input[type="password" i]::-internal-reveal { + width: 1.3em; + height: 1.3em; + cursor: default; + flex: none; + background-image: url(images/password_reveal_on.svg); + background-repeat: no-repeat; + background-position: center; + background-size: contain; + margin-left: 3px; + margin-right: 3px; +} + +input[type="password" i]::-internal-reveal.reveal { + background-image: url(images/password_reveal_off.svg); +} + +input[type="password" i]::-internal-reveal:hover, +input[type="password" i]::-internal-reveal:focus { + border-radius: 1px; + cursor: pointer; +} + +input[type="password" i]::-internal-strong { + color: light-dark(#0B57D0, #A8C7FA); + font-family: roboto; + -webkit-text-security: none; +} + input[type="hidden" i], input[type="image" i], input[type="file" i] { - -webkit-appearance: initial; + appearance: none; padding: initial; background-color: initial; border: initial; + cursor: default; } input[type="file" i] { align-items: baseline; color: inherit; + overflow: hidden !important; text-align: start !important; + text-overflow: ellipsis; + white-space: pre; } -input:-webkit-autofill, textarea:-webkit-autofill, select:-webkit-autofill { - background-color: #FAFFBD !important; - background-image:none !important; - color: #000000 !important; +input[type="image" i] { + cursor: pointer; } -input[type="radio" i], input[type="checkbox" i] { - margin: 3px 0.5ex; +input[type="radio" i], +input[type="checkbox" i] { + margin:3px 3px 3px 4px; padding: initial; background-color: initial; border: initial; + cursor: default; +} + +input[type="radio" i] { + margin:3px 3px 0 5px; } input[type="button" i], input[type="submit" i], input[type="reset" i] { - -webkit-appearance: push-button; - -webkit-user-select: none; + -internal-empty-line-height: fabricated; + appearance: auto; + user-select: none; white-space: pre } input[type="file" i]::-webkit-file-upload-button { - -webkit-appearance: push-button; + appearance: auto; -webkit-user-modify: read-only !important; white-space: nowrap; margin: 0; + margin-inline-end: 4px; /* See FileUploadControlIntrinsicInlineSize() */ font-size: inherit; } -input[type="button" i], input[type="submit" i], input[type="reset" i], input[type="file" i]::-webkit-file-upload-button, button { +input[type="button" i], +input[type="submit" i], +input[type="reset" i], +input[type="file" i]::-webkit-file-upload-button, +button { align-items: flex-start; text-align: center; cursor: default; - color: ButtonText; - padding: 2px 6px 3px 6px; - border: 2px outset ButtonFace; + padding-block: 1px; + padding-inline: 6px; + border: 2px outset ButtonBorder; + box-sizing: border-box; background-color: ButtonFace; - box-sizing: border-box + color: ButtonText; +} + +input[type="checkbox" i]:disabled, +input[type="file" i]:disabled, +input[type="hidden" i]:disabled, +input[type="image" i]:disabled, +input[type="radio" i]:disabled, +input[type="range" i]:disabled { + background-color: initial; } input[type="range" i] { - -webkit-appearance: slider-horizontal; + appearance: auto; padding: initial; border: initial; margin: 2px; - color: #909090; + cursor: default; + color: light-dark(#101010, #ffffff); } -input[type="range" i]::-webkit-slider-container, input[type="range" i]::-webkit-media-slider-container { +input[type="range" i]::-webkit-slider-container, +input[type="range" i]::-webkit-media-slider-container { + appearance: inherit; flex: 1; - min-width: 0; + min-inline-size: 0; box-sizing: border-box; -webkit-user-modify: read-only !important; display: flex; } +input[type="range" i]:-internal-has-datalist::-webkit-slider-container { + /* + * See LayoutThemeDefault. "22px" is + * 2 * (SliderTickOffsetFromTrackCenter() + SliderTickSize().Height()). + */ + min-block-size: 22px; +} + input[type="range" i]::-webkit-slider-runnable-track { flex: 1; - min-width: 0; - -webkit-align-self: center; + min-inline-size: 0; + align-self: center; box-sizing: border-box; -webkit-user-modify: read-only !important; display: block; } -input[type="range" i]::-webkit-slider-thumb, input[type="range" i]::-webkit-media-slider-thumb { - -webkit-appearance: sliderthumb-horizontal; +input[type="range" i]::-webkit-slider-thumb, +input[type="range" i]::-webkit-media-slider-thumb { + appearance: auto; box-sizing: border-box; -webkit-user-modify: read-only !important; display: block; } -input[type="button" i]:disabled, input[type="submit" i]:disabled, input[type="reset" i]:disabled, -input[type="file" i]:disabled::-webkit-file-upload-button, button:disabled, -select:disabled, keygen:disabled, optgroup:disabled, option:disabled, -select[disabled]>option { - color: GrayText +input[type="range" i]:disabled { + color: #c5c5c5; +} + +input[type="button" i]:disabled, +input[type="submit" i]:disabled, +input[type="reset" i]:disabled, +input[type="color" i]:disabled, +input[type="file" i]:disabled::-webkit-file-upload-button, +button:disabled { + background-color: light-dark(rgba(239, 239, 239, 0.3), rgba(19, 1, 1, 0.3)); + border-color: light-dark(rgba(118, 118, 118, 0.3), rgba(195, 195, 195, 0.3)); + color: light-dark(rgba(16, 16, 16, 0.3), rgba(255, 255, 255, 0.3)); } input[type="button" i]:active, input[type="submit" i]:active, input[type="reset" i]:active, input[type="file" i]:active::-webkit-file-upload-button, button:active { @@ -642,46 +774,59 @@ input[type="button" i]:active:disabled, input[type="submit" i]:active:disabled, border-style: outset } -option:-internal-spatial-navigation-focus { - outline: black dashed 1px; - outline-offset: -1px; +input:disabled, textarea:disabled { + cursor: default; + background-color: light-dark(rgba(239, 239, 239, 0.3), rgba(59, 59, 59, 0.3)); + color: light-dark(#545454, #aaaaaa); } -datalist { - display: none +option:-internal-spatial-navigation-focus { + outline: light-dark(black, white) dashed 1px; + outline-offset: -1px; } +/* https://html.spec.whatwg.org/multipage/rendering.html#hidden-elements */ +/* TODO(crbug.com/1231263): should be display:none. */ area { - display: inline; - cursor: pointer; + display: inline; +} +base, basefont, datalist, head, link, meta, noembed, +noframes, param, rp, script, style, template, title { + display: none; +} +input[type="hidden" i] { + display: none !important; } -param { - display: none +area:-webkit-any-link { + cursor: pointer; } input[type="checkbox" i] { - -webkit-appearance: checkbox; + appearance: auto; box-sizing: border-box; } input[type="radio" i] { - -webkit-appearance: radio; + appearance: auto; box-sizing: border-box; } input[type="color" i] { - -webkit-appearance: square-button; - width: 44px; - height: 23px; - background-color: ButtonFace; + appearance: auto; + inline-size: 50px; + block-size: 27px; /* Same as native_theme_base. */ - border: 1px #a9a9a9 solid; + border: 1px solid ButtonBorder; padding: 1px 2px; + cursor: default; + box-sizing: border-box; + background-color: ButtonFace; + color: ButtonText; } input[type="color" i]::-webkit-color-swatch-wrapper { - display:flex; + display: flex; padding: 4px 2px; box-sizing: border-box; -webkit-user-modify: read-only !important; @@ -690,6 +835,8 @@ input[type="color" i]::-webkit-color-swatch-wrapper { } input[type="color" i]::-webkit-color-swatch { + /* The swatch should not be affected by color scheme. */ + color-scheme: only light; background-color: #000000; border: 1px solid #777777; flex: 1; @@ -698,14 +845,14 @@ input[type="color" i]::-webkit-color-swatch { } input[type="color" i][list] { - -webkit-appearance: menulist; - width: 88px; - height: 23px + appearance: auto; + inline-size: 94px; + block-size: 27px } input[type="color" i][list]::-webkit-color-swatch-wrapper { - padding-left: 8px; - padding-right: 24px; + padding-inline-start: 8px; + padding-inline-end: 24px; } input[type="color" i][list]::-webkit-color-swatch { @@ -714,11 +861,13 @@ input[type="color" i][list]::-webkit-color-swatch { input::-webkit-calendar-picker-indicator { display: inline-block; - width: 0.66em; - height: 0.66em; - padding: 0.17em 0.34em; + inline-size: 0.66em; + block-size: 0.66em; + padding-block: 0.17em; + padding-inline: 0.34em; -webkit-user-modify: read-only !important; opacity: 0; + cursor: default; pointer-events: none; } @@ -753,49 +902,54 @@ input[readonly]::-webkit-calendar-picker-indicator { visibility: hidden; } +/* Form controls that measure the inline size without doing actual layout + need to disable `text-autospace`, if their content can be affected by + the property. crbug.com/1484863 */ +input[type="date" i], input[type="datetime-local" i], input[type="month" i], +input[type="week" i], select { + text-autospace: no-autospace !important; +} + select { - -webkit-appearance: menulist; + appearance: auto; box-sizing: border-box; align-items: center; - border: 1px solid; white-space: pre; -webkit-rtl-ordering: logical; - color: black; - background-color: white; + color: FieldText; + background-color: Field; + border: 1px solid light-dark(#767676, #858585); cursor: default; + border-radius: 0; } -select:not(:-internal-list-box) { - overflow: visible !important; +select:disabled { + opacity: 0.7; } +/* -internal-list-box is how we specify select[multiple] */ +/* select[multiple] is an exception to the prohibition on sizes here + because it is one of the few controls with borders that grow on zoom + (to solve a nasty scrollbar location problem) */ select:-internal-list-box { - -webkit-appearance: listbox; + appearance: auto; align-items: flex-start; - border: 1px inset gray; - border-radius: initial; - overflow-x: hidden; - overflow-y: scroll; + -internal-overflow-inline: hidden; + -internal-overflow-block: scroll; vertical-align: text-bottom; - -webkit-user-select: none; white-space: nowrap; + border-radius: 2px; } -optgroup { - font-weight: bolder; - display: block; -} - -option { - font-weight: normal; - display: block; - padding: 0 2px 1px 2px; - white-space: pre; - min-height: 1.2em; +select:not(:-internal-list-box) { + overflow: visible !important; } -select:-internal-list-box optgroup option:before { - content: "\00a0\00a0\00a0\00a0";; +/* The padding here should match the value of + |extraPaddingForOptionInsideOptgroup| in list_picker.js, which is the + padding for select optgroup option. */ +select:-internal-list-box optgroup option { + padding-inline-start: 20px; } select:-internal-list-box option, @@ -803,23 +957,92 @@ select:-internal-list-box optgroup { line-height: initial !important; } -select:-internal-list-box:focus option:checked { - background-color: -internal-active-list-box-selection !important; - color: -internal-active-list-box-selection-text !important; +/* option selected, list-box focused */ +/* TODO(crbug.com/1244986): We should be able to remove !important here, but + it breaks some WebUI menus. */ +select:-internal-list-box:focus option:checked, +select:-internal-list-box:focus option:checked:hover { + background-color: SelectedItem !important; + color: SelectedItemText !important; } -select:-internal-list-box option:checked { +/* TODO(crbug.com/1244986): We should be able to remove !important here, but + it breaks some WebUI menus. */ +select:-internal-list-box:focus option:checked:disabled { background-color: -internal-inactive-list-box-selection !important; - color: -internal-inactive-list-box-selection-text !important; +} + +/* option selected, list-box not focused */ +select:-internal-list-box option:checked, +select:-internal-list-box option:checked:hover { + background-color: light-dark(#cecece, #545454); + color: light-dark(#101010, #FFFFFF); } select:-internal-list-box:disabled option:checked, -select:-internal-list-box option:checked:disabled { - color: gray !important; +select:-internal-list-box option:checked:disabled, +select:-internal-list-box option:checked:disabled:hover { + color: light-dark(gray, #aaa); } select:-internal-list-box hr { border-style: none; + margin-block-start: 0.5em; + margin-block-end: 0; +} + +select:-internal-list-box:focus-visible option:-internal-multi-select-focus { + outline: auto 1px -webkit-focus-ring-color; + outline-offset: -1px; +} + +select:-internal-list-box option:hover { + background-color: initial; +} + +optgroup { + font-weight: bolder; + display: block; +} + +option { + font-weight: normal; + display: block; + padding-inline: 2px; + padding-block-start: 0; + padding-block-end: 1px; + white-space: nowrap; + min-block-size: 1.2em; +} + +/* The following select style rules have to go after the other + select styles in order to have higher precedence. */ + +/* TODO(crbug.com/880258): Use different styles for + `-internal-autofill-previewed` and `-internal-autofill-selected`. */ +input:-internal-autofill-previewed, +input:-internal-autofill-selected, +textarea:-internal-autofill-previewed, +textarea:-internal-autofill-selected, +select:-internal-autofill-previewed, +select:-internal-autofill-selected { + appearance: menulist-button; + background-image:none !important; + background-color: light-dark(#E8F0FE, rgba(70,90,126,0.4)) !important; + color: FieldText !important; +} + +input:disabled, +select:disabled, +textarea:disabled { + border-color: rgba(118, 118, 118, 0.3); +} + +select:disabled, +optgroup:disabled, +option:disabled, +select[disabled]>option { + color: light-dark(GrayText, #aaa); } output { @@ -829,82 +1052,100 @@ output { /* meter */ meter { - -webkit-appearance: meter; + appearance: auto; box-sizing: border-box; display: inline-block; - height: 1em; - width: 5em; + block-size: 1em; + inline-size: 5em; vertical-align: -0.2em; + -webkit-user-modify: read-only !important; } meter::-webkit-meter-inner-element { - -webkit-appearance: inherit; + appearance: inherit; box-sizing: inherit; + display: none; -webkit-user-modify: read-only !important; - height: 100%; - width: 100%; + block-size: 100%; + inline-size: 100%; +} + +meter::-webkit-meter-inner-element:-internal-shadow-host-has-appearance { + display: grid; + grid-template-rows: 1fr [line1] 2fr [line2] 1fr; + position: relative; +} + +meter::-internal-fallback:-internal-shadow-host-has-appearance { + display: none; } meter::-webkit-meter-bar { - background: linear-gradient(to bottom, #ddd, #eee 20%, #ccc 45%, #ccc 55%, #ddd); - height: 100%; - width: 100%; + block-size: 100%; + inline-size: 100%; -webkit-user-modify: read-only !important; + background: light-dark(#efefef, #3B3B3B); + border: thin solid light-dark(rgba(118, 118, 118, 0.3), #858585); + grid-row-start: line1; + grid-row-end: line2; + border-radius: 20px; box-sizing: border-box; + align-self: unsafe center; + position: absolute; + overflow: hidden; } meter::-webkit-meter-optimum-value { - background: linear-gradient(to bottom, #ad7, #cea 20%, #7a3 45%, #7a3 55%, #ad7); - height: 100%; + block-size: 100%; -webkit-user-modify: read-only !important; box-sizing: border-box; + background: light-dark(#107c10, #74b374) } meter::-webkit-meter-suboptimum-value { - background: linear-gradient(to bottom, #fe7, #ffc 20%, #db3 45%, #db3 55%, #fe7); - height: 100%; + block-size: 100%; -webkit-user-modify: read-only !important; box-sizing: border-box; + background: light-dark(#ffb900, #f2c812) } meter::-webkit-meter-even-less-good-value { - background: linear-gradient(to bottom, #f77, #fcc 20%, #d44 45%, #d44 55%, #f77); - height: 100%; + block-size: 100%; -webkit-user-modify: read-only !important; box-sizing: border-box; + background: light-dark(#d83b01, #e98f6d) } /* progress */ progress { - -webkit-appearance: progress-bar; + appearance: auto; box-sizing: border-box; display: inline-block; - height: 1em; - width: 10em; + block-size: 1em; + inline-size: 10em; vertical-align: -0.2em; } progress::-webkit-progress-inner-element { - -webkit-appearance: inherit; box-sizing: inherit; -webkit-user-modify: read-only; - height: 100%; - width: 100%; + block-size: 100%; + inline-size: 100%; } progress::-webkit-progress-bar { background-color: gray; - height: 100%; - width: 100%; + block-size: 100%; + inline-size: 100%; -webkit-user-modify: read-only !important; box-sizing: border-box; } progress::-webkit-progress-value { background-color: green; - height: 100%; - width: 50%; /* should be removed later */ + block-size: 100%; + inline-size: 50%; /* should be removed later */ -webkit-user-modify: read-only !important; box-sizing: border-box; } @@ -915,6 +1156,10 @@ u, ins { text-decoration: underline } +abbr[title], acronym[title] { + text-decoration: dotted underline; +} + strong, b { font-weight: bold } @@ -935,8 +1180,8 @@ pre, xmp, plaintext, listing { } mark { - background-color: yellow; - color: black + background-color: Mark; + color: MarkText; } big { @@ -967,73 +1212,156 @@ nobr { /* states */ -:focus { - outline: auto 5px -webkit-focus-ring-color +:-internal-selector-fragment-anchor { + outline: Highlight 3px solid; } -/* Read-only text fields do not show a focus ring but do still receive focus */ -html:focus, body:focus, input[readonly]:focus { +:focus-visible { + outline: auto 1px -webkit-focus-ring-color +} + +html:focus-visible, body:focus-visible { outline: none } -embed:focus, iframe:focus, object:focus { +embed:focus-visible, iframe:focus-visible, object:focus-visible { outline: none } -input:focus, textarea:focus, keygen:focus, select:focus { - outline-offset: -2px +input:focus-visible, textarea:focus-visible, select:focus-visible { + outline-offset: 0; } -input[type="button" i]:focus, -input[type="checkbox" i]:focus, -input[type="file" i]:focus, -input[type="hidden" i]:focus, -input[type="image" i]:focus, -input[type="radio" i]:focus, -input[type="reset" i]:focus, -input[type="search" i]:focus, -input[type="submit" i]:focus, -input[type="file" i]:focus::-webkit-file-upload-button { +input[type="button" i]:focus-visible, +input[type="file" i]:focus-visible, +input[type="hidden" i]:focus-visible, +input[type="image" i]:focus-visible, +input[type="reset" i]:focus-visible, +input[type="submit" i]:focus-visible, +input[type="file" i]:focus-visible::-webkit-file-upload-button { outline-offset: 0 } +input[type="checkbox" i]:focus-visible, +input[type="radio" i]:focus-visible { + outline-offset: 2px; +} + + +input[type="date" i]::-webkit-calendar-picker-indicator, +input[type="datetime-local" i]::-webkit-calendar-picker-indicator, +input[type="month" i]::-webkit-calendar-picker-indicator, +input[type="week" i]::-webkit-calendar-picker-indicator { + background-image: light-dark(url(images/calendar_icon.svg), url(images/calendar_icon_white.svg)); + background-origin: content-box; + background-repeat: no-repeat; + background-size: contain; + block-size: 1.0em; + inline-size: 1.0em; + opacity: 1; + outline: none; + padding: 2px; +} + +input[type="date" i]::-webkit-calendar-picker-indicator:focus-visible, +input[type="datetime-local" i]::-webkit-calendar-picker-indicator:focus-visible, +input[type="month" i]::-webkit-calendar-picker-indicator:focus-visible, +input[type="week" i]::-webkit-calendar-picker-indicator:focus-visible { + outline: solid 2px -webkit-focus-ring-color; + outline-offset: -2px; +} + +input[type="time" i]::-webkit-calendar-picker-indicator { + background-image: light-dark(url(images/time_icon.svg), url(images/time_icon_white.svg)); + background-origin: content-box; + background-repeat: no-repeat; + background-size: contain; + opacity: 1; + outline: none; + margin-inline-start: 8px; + padding-inline-start: 3px; + padding-inline-end: 3px; + padding-block: 3px; + block-size: 1.05em; + inline-size: 1.05em; +} + +input[type="time" i]::-webkit-calendar-picker-indicator:focus-visible { + outline: solid 2px -webkit-focus-ring-color; + outline-offset: -2px; +} + +input::-webkit-calendar-picker-indicator:hover { + background-color: initial; +} + +input::-webkit-datetime-edit-ampm-field:focus, +input::-webkit-datetime-edit-day-field:focus, +input::-webkit-datetime-edit-hour-field:focus, +input::-webkit-datetime-edit-millisecond-field:focus, +input::-webkit-datetime-edit-minute-field:focus, +input::-webkit-datetime-edit-month-field:focus, +input::-webkit-datetime-edit-second-field:focus, +input::-webkit-datetime-edit-week-field:focus, +input::-webkit-datetime-edit-year-field:focus { + background-color: light-dark(highlight, #99C8FF); + color: light-dark(highlighttext, #000000); + outline: none; +} + +input::-webkit-datetime-edit-year-field[disabled], +input::-webkit-datetime-edit-month-field[disabled], +input::-webkit-datetime-edit-week-field[disabled], +input::-webkit-datetime-edit-day-field[disabled], +input::-webkit-datetime-edit-ampm-field[disabled], +input::-webkit-datetime-edit-hour-field[disabled], +input::-webkit-datetime-edit-millisecond-field[disabled], +input::-webkit-datetime-edit-minute-field[disabled], +input::-webkit-datetime-edit-second-field[disabled] { + color: light-dark(GrayText, rgb(165, 165, 165)); +} + a:-webkit-any-link { color: -webkit-link; text-decoration: underline; - cursor: auto; + cursor: pointer; } a:-webkit-any-link:active { color: -webkit-activelink } +a:-webkit-any-link:read-write { + cursor: text; +} + +a:-webkit-any-link:focus-visible { + outline-offset: 1px; +} + /* HTML5 ruby elements */ ruby, rt { text-indent: 0; /* blocks used for ruby rendering should not trigger this */ } +ruby { + display: ruby; +} + rt { line-height: normal; - -webkit-text-emphasis: none; + text-emphasis: none; } ruby > rt { - display: block; + display: ruby-text; font-size: 50%; text-align: start; } -ruby > rp { - display: none; -} - /* other elements */ -noframes { - display: none -} - frameset, frame { display: block } @@ -1046,6 +1374,12 @@ iframe { border: 2px inset } +fencedframe { + border: 2px inset; + object-fit: contain !important; + object-position: 50% 50% !important; +} + details { display: block } @@ -1054,70 +1388,157 @@ summary { display: block } -summary::-webkit-details-marker { - display: inline-block; - width: 0.66em; - height: 0.66em; - -webkit-margin-end: 0.4em; -} - -template { - display: none +/* + * https://html.spec.whatwg.org/C/#the-details-and-summary-elements + * The specification doesn't have |details >| and |:first-of-type|. + * We add them because: + * - We had provided |summary { display: block }| for a long time, + * there are sites using without details, and they + * expect that is not a list-item. + * - Firefox does so. + */ +details > summary:first-of-type { + display: list-item; + counter-increment: list-item 0; + list-style: disclosure-closed inside; } -bdi, output { - unicode-bidi: -webkit-isolate; +details[open] > summary:first-of-type { + list-style-type: disclosure-open; } -bdo { - unicode-bidi: bidi-override; +/* https://html.spec.whatwg.org/multipage/rendering.html#bidi-rendering */ +/* This chunk of styles interacts with the `name == html_names::kDirAttr` case + in HTMLElement::CollectStyleForPresentationAttribute(). Make sure any changes + here are congruent with changes made there. */ +address, blockquote, center, div, figure, figcaption, footer, form, header, hr, +legend, listing, main, p, plaintext, pre, summary, xmp, article, aside, h1, h2, +h3, h4, h5, h6, hgroup, nav, section, search, table, caption, colgroup, col, +thead, tbody, tfoot, tr, td, th, dir, dd, dl, dt, menu, ol, ul, li, bdi, +output, [dir=ltr i], [dir=rtl i], [dir=auto i] { + unicode-bidi: isolate; } - -textarea[dir=auto i] { - unicode-bidi: -webkit-plaintext; +bdo, bdo[dir] { + unicode-bidi: isolate-override; } - -dialog:not([open]) { - display: none +textarea[dir=auto i], pre[dir=auto i] { + unicode-bidi: plaintext; } dialog { + display: none; + /* https://html.spec.whatwg.org/multipage/rendering.html#flow-content-3 */ position: absolute; - left: 0; - right: 0; - width: -webkit-fit-content; - height: -webkit-fit-content; + inset-inline-start: 0; + inset-inline-end: 0; + width: fit-content; + height: fit-content; margin: auto; border: solid; padding: 1em; - background: white; - color: black + background-color: Canvas; + color: CanvasText; } -dialog::backdrop { +dialog[open] { + display: block; +} + +dialog:-internal-dialog-in-top-layer { + /* https://html.spec.whatwg.org/multipage/rendering.html#flow-content-3 */ position: fixed; - top: 0; - right: 0; - bottom: 0; - left: 0; - background: rgba(0,0,0,0.1) + overflow: auto; + inset-block-start: 0; + inset-block-end: 0; + max-width: calc(100% - 6px - 2em); + max-height: calc(100% - 6px - 2em); + /* https://github.com/w3c/csswg-drafts/issues/6939#issuecomment-1016679588 */ + user-select: text; + visibility: visible; } -/* page */ +dialog:modal { + overlay: auto !important; +} -@page { +/* TODO(foolip): In the Fullscreen spec, there's a ::backdrop block with the + properties shared with :fullscreen::backdrop (see fullscreen.css). */ +dialog:-internal-dialog-in-top-layer::backdrop { + position: fixed; + inset: 0; + /* https://html.spec.whatwg.org/multipage/rendering.html#flow-content-3 */ + background: rgba(0,0,0,0.1); +} + +slot { + display: contents; +} + +[popover] { + position: fixed; + inset: 0; + width: fit-content; + height: fit-content; + margin: auto; + border: solid; + padding: 0.25em; + overflow: auto; + color: CanvasText; + background-color: Canvas; +} + +/* This ensures that popovers get display:none when they are not open, and we + need to be careful not to affect `` when open as a dialog. */ +[popover]:not(:popover-open):not(dialog[open]) { + display:none; +} + +/* The UA stylesheet has a rule like dialog{display:none}, so + needs this to be visible when it is open as a popover. */ +dialog:popover-open { + display:block; +} + +/* This rule matches popovers (dialog or not) that are currently open as a + popover. */ +[popover]:popover-open:not(dialog), dialog:popover-open:not([open]) { + overlay: auto !important; +} + +[popover]:-internal-popover-in-top-layer::backdrop { + /* From the (modified) fullscreen spec: https://fullscreen.spec.whatwg.org/#user-agent-level-style-sheet-defaults: */ + position: fixed; + inset: 0; + /* Specific to [popover]: */ + pointer-events: none !important; + background-color: transparent; +} + +/* Pagination */ + +@media print { + @page { /* FIXME: Define the right default values for page properties. */ size: auto; - margin: auto; + padding: 0px; border-width: 0px; + } + + /* Allows table headers and footers to print at the top / bottom of each + page. */ + thead { break-inside: avoid; } + tfoot { break-inside: avoid; } } -/* Disable multicol in printing, since it's not implemented properly. See crbug.com/99358 */ +/* spelling/grammar error pseudos */ -@media print { - * { -webkit-columns: auto !important; } +html::spelling-error { + text-decoration: -internal-spelling-error-color spelling-error; } -/* noscript is handled internally, as it depends on settings. */ +html::grammar-error { + text-decoration: -internal-grammar-error-color grammar-error; +} +/* noscript is handled internally, as it depends on settings. */ diff --git a/ua-sheets/firefox.css b/ua-sheets/firefox.css index 24686e8..769ebec 100644 --- a/ua-sheets/firefox.css +++ b/ua-sheets/firefox.css @@ -82,6 +82,7 @@ ol, p, plaintext, pre, +search, section, summary, table, @@ -124,6 +125,7 @@ hgroup, html, main, nav, +search, section, summary { display: block; @@ -134,7 +136,7 @@ body { margin: 8px; } -p, dl, multicol { +p, dl { display: block; margin-block-start: 1em; margin-block-end: 1em; @@ -147,10 +149,8 @@ dd { blockquote, figure { display: block; - margin-block-start: 1em; - margin-block-end: 1em; - margin-inline-start: 40px; - margin-inline-end: 40px; + margin-block: 1em; + margin-inline: 40px; } address { @@ -167,68 +167,85 @@ h1 { display: block; font-size: 2em; font-weight: bold; - margin-block-start: .67em; - margin-block-end: .67em; + margin-block: .67em; } -h2, -:is(article, aside, nav, section) -h1 { +h2 { display: block; font-size: 1.5em; font-weight: bold; - margin-block-start: .83em; - margin-block-end: .83em; + margin-block: .83em; } -h3, -:is(article, aside, nav, section) -:is(article, aside, nav, section) -h1 { +h3 { display: block; font-size: 1.17em; font-weight: bold; - margin-block-start: 1em; - margin-block-end: 1em; + margin-block: 1em; } -h4, -:is(article, aside, nav, section) -:is(article, aside, nav, section) -:is(article, aside, nav, section) -h1 { +h4 { display: block; font-size: 1.00em; font-weight: bold; - margin-block-start: 1.33em; - margin-block-end: 1.33em; + margin-block: 1.33em; } -h5, -:is(article, aside, nav, section) -:is(article, aside, nav, section) -:is(article, aside, nav, section) -:is(article, aside, nav, section) -h1 { +h5 { display: block; font-size: 0.83em; font-weight: bold; - margin-block-start: 1.67em; - margin-block-end: 1.67em; + margin-block: 1.67em; } -h6, -:is(article, aside, nav, section) -:is(article, aside, nav, section) -:is(article, aside, nav, section) -:is(article, aside, nav, section) -:is(article, aside, nav, section) -h1 { +h6 { display: block; font-size: 0.67em; font-weight: bold; - margin-block-start: 2.33em; - margin-block-end: 2.33em; + margin-block: 2.33em; +} + +/* stylelint-disable-next-line media-query-no-invalid */ +@media (-moz-bool-pref: "layout.css.h1-in-section-ua-styles.enabled") { + :is(article, aside, nav, section) + h1 { + margin-block: 0.83em; + font-size: 1.50em; + } + + :is(article, aside, nav, section) + :is(article, aside, nav, section) + h1 { + margin-block: 1.00em; + font-size: 1.17em; + } + + :is(article, aside, nav, section) + :is(article, aside, nav, section) + :is(article, aside, nav, section) + h1 { + margin-block: 1.33em; + font-size: 1.00em; + } + + :is(article, aside, nav, section) + :is(article, aside, nav, section) + :is(article, aside, nav, section) + :is(article, aside, nav, section) + h1 { + margin-block: 1.67em; + font-size: 0.83em; + } + + :is(article, aside, nav, section) + :is(article, aside, nav, section) + :is(article, aside, nav, section) + :is(article, aside, nav, section) + :is(article, aside, nav, section) + h1 { + margin-block: 2.33em; + font-size: 0.67em; + } } listing { @@ -236,16 +253,14 @@ listing { font-family: -moz-fixed; font-size: medium; white-space: pre; - margin-block-start: 1em; - margin-block-end: 1em; + margin-block: 1em; } xmp, pre, plaintext { display: block; font-family: -moz-fixed; white-space: pre; - margin-block-start: 1em; - margin-block-end: 1em; + margin-block: 1em; } /* tables */ @@ -378,25 +393,19 @@ table[rules][rules="cols"] > tr > td, table[rules][rules="cols"] > * > tr > td, table[rules][rules="cols"] > tr > th, table[rules][rules="cols"] > * > tr > th { - border-inline-start-width: thin; - border-inline-end-width: thin; - border-inline-start-style: solid; - border-inline-end-style: solid; + border-inline-width: thin; + border-inline-style: solid; } table[rules][rules="groups"] > colgroup { - border-inline-start-width: thin; - border-inline-end-width: thin; - border-inline-start-style: solid; - border-inline-end-style: solid; + border-inline-width: thin; + border-inline-style: solid; } table[rules][rules="groups"] > tfoot, table[rules][rules="groups"] > thead, table[rules][rules="groups"] > tbody { - border-block-start-width: thin; - border-block-end-width: thin; - /* Note: `-end` is missing, see https://bugzilla.mozilla.org/show_bug.cgi?id=1832101 */ - border-block-start-style: solid; + border-block-width: thin; + border-block-style: solid; } @@ -407,8 +416,7 @@ caption { } table[align="center"] > caption { - margin-inline-start: auto; - margin-inline-end: auto; + margin-inline: auto; } table[align="center"] > caption[align="left"]:dir(ltr) { @@ -473,9 +481,7 @@ th { text-align: -moz-center-or-inherit; } -tr > form:-moz-is-html, tbody > form:-moz-is-html, -thead > form:-moz-is-html, tfoot > form:-moz-is-html, -table > form:-moz-is-html { +:is(tr, tbody, thead, tfoot, table) > form:-moz-is-html { /* Important: don't show these forms in HTML */ display: none !important; } @@ -589,8 +595,7 @@ li { :is(ul, ol, dir, menu, dl) dir, :is(ul, ol, dir, menu, dl) menu, :is(ul, ol, dir, menu, dl) dl { - margin-block-start: 0; - margin-block-end: 0; + margin-block: 0; } /* 2 deep unordered lists use a circle */ @@ -618,10 +623,8 @@ hr { color: gray; border-width: 1px; border-style: inset; - margin-block-start: 0.5em; - margin-block-end: 0.5em; - margin-inline-start: auto; - margin-inline-end: auto; + margin-block: 0.5em; + margin-inline: auto; overflow: hidden; /* FIXME: This is not really per spec */ @@ -642,15 +645,6 @@ img::before { unicode-bidi: isolate; } -object:-moz-broken > *|* { - /* - Inherit in the object's alignment so that if we aren't aligned explicitly - we'll end up in the right place vertically. See bug 36997. Note that this - is not !important because we _might_ be aligned explicitly. - */ - vertical-align: inherit; -} - img[usemap], object[usemap] { color: blue; } @@ -771,15 +765,13 @@ video > .caption-box { * The pseudo element won't inherit CSS styles from its direct parent, `::cue` * would actually inherit styles from video because it's video's pseudo element. * Therefore, we have to explicitly set some styles which are already defined - * in its parent element in vtt.jsm. + * in its parent element in vtt.sys.mjs. */ ::cue { color: rgba(255, 255, 255, 1); white-space: pre-line; background-color: rgba(0, 0, 0, 0.8); font: 10px sans-serif; - font-size: var(--cue-font-size); - writing-mode: var(--cue-writing-mode, inherit); overflow-wrap: break-word; /* TODO : enable unicode-bidi, right now enable it would cause incorrect display direction, maybe related with bug 1558431. */ @@ -824,15 +816,21 @@ dialog::backdrop { background: rgba(0, 0, 0, 0.1); } +/* https://html.spec.whatwg.org/#the-marquee-element-2 */ marquee { - inline-size: -moz-available; display: inline-block; + text-align: initial; + overflow: hidden !important; + + /* See https://github.com/whatwg/html/issues/10249 */ + inline-size: -moz-available; vertical-align: text-bottom; - text-align: start; + white-space: nowrap; } marquee:is([direction="up"], [direction="down"]) { block-size: 200px; + white-space: unset; } /* Ruby */ @@ -887,16 +885,6 @@ slot { display: contents; } -/* Un-invert images and videos for users using inverted colors. - * "User agents must add the following rule to their UA style sheet" - * https://www.w3.org/TR/mediaqueries-5/#inverted - */ -@media (inverted-colors) { - img:not(picture > img), picture, video { - filter: invert(100%); - } -} - /* Hide noscript elements if scripting is enabled */ @media (scripting) { noscript { @@ -904,8 +892,16 @@ slot { } } +@media print { + input, textarea, select, button, details { + -moz-user-input: none !important; + pointer-events: none !important; + } +} + /* Popover UA style, https://html.spec.whatwg.org/#flow-content-3 */ -@media (-moz-popover-enabled) { +/* stylelint-disable-next-line media-query-no-invalid */ +@media (-moz-bool-pref: "dom.element.popover.enabled") { [popover]:not(:popover-open):not(dialog[open]) { display:none; }