diff --git a/mobile/android/themes/core/aboutReader.css b/mobile/android/themes/core/aboutReader.css index 2df2d1ff6206..32f52080c04d 100644 --- a/mobile/android/themes/core/aboutReader.css +++ b/mobile/android/themes/core/aboutReader.css @@ -118,3 +118,409 @@ body.dark > .container > .content blockquote { color: #aaaaaa !important; border-left-color: #777777 !important; } + +#reader-message { + margin-top: 40px; + display: none; + text-align: center; + width: 100%; + font-size: 0.9em; +} + +.header { + text-align: start; + display: none; +} + +.domain, +.credits { + font-size: 0.9em; + font-family: sans-serif; +} + +.domain { + margin-top: 10px; + padding-bottom: 10px; + color: #00acff !important; + text-decoration: none; +} + +.domain-border { + margin-top: 15px; + border-bottom: 1.5px solid #777777; + width: 50%; +} + +.header > h1 { + font-size: 1.33em; + font-weight: 700; + line-height: 1.1em; + width: 100%; + margin: 0px; + margin-top: 32px; + margin-bottom: 16px; + padding: 0px; +} + +.header > .credits { + padding: 0px; + margin: 0px; + margin-bottom: 32px; +} + +/*======= Controls toolbar =======*/ + +.toolbar { + font-family: sans-serif; + position: fixed; + width: 100%; + left: 0; + margin: 0; + padding: 0; + bottom: 0; + list-style: none; + pointer-events: none; + transition: opacity 420ms linear; +} + +.toolbar > * { + float: right; +} + +.button { + width: 56px; + height: 56px; + display: block; + background-position: center; + background-size: 26px 16px; + background-repeat: no-repeat; + background-color: #0979D9; + border-radius: 10000px; + margin: 20px; + border: 0; + box-shadow: 0px 4px 8px 0px rgba(0,0,0,0.40); +} + +.button:active { + background-color: #086ACC; +} + +/* Remove dotted border when button is focused */ +.button::-moz-focus-inner, +.dropdown-popup > div > button::-moz-focus-inner { + border: 0; +} + +.button[hidden], +.toolbar[hidden] { + display: none; +} + +.dropdown-toggle, +#reader-popup { + pointer-events: auto; +} + +.dropdown { + left: 0; + text-align: center; + display: inline-block; + list-style: none; + margin: 0px; + padding: 0px; +} + +/*======= Font style popup =======*/ + +.dropdown-popup { + position: absolute; + left: 0; + width: calc(100% - 30px); + margin: 15px; + z-index: 1000; + background: #EBEBF0; + visibility: hidden; + border: 0; + border-radius: 4px; + box-shadow: 0px 4px 8px 0px rgba(0,0,0,0.40); + -moz-user-select: none; +} + +/* Only used on desktop */ +.dropdown-popup > hr, +.dropdown-arrow, +#font-type-buttons > button > .name, +#content-width-buttons, +#line-height-buttons { + display: none; +} + +.open > .dropdown-popup { + visibility: visible; + bottom: 0; +} + +#font-type-buttons, +#font-size-buttons, +#color-scheme-buttons { + display: flex; + flex-direction: row; +} + +#font-type-buttons > button, +#color-scheme-buttons > button { + text-align: center; +} + +#font-type-buttons > button, +#font-size-buttons > button { + width: 50%; + background-color: transparent; + border: 0; +} + +#font-type-buttons > button { + font-size: 24px; + color: #AFB1B3; + padding: 15px 0; +} + +#font-type-buttons > button:active, +#font-type-buttons > button.selected { + color: #222222; +} + +#font-size-sample { + flex: 0; + font-size: 24px; + color: #000000; + margin: 0 30px; + padding: 0 10px; +} + +.serif-button { + font-family: serif; +} + +.minus-button, +.plus-button { + background-color: transparent; + border: 0; + height: 60px; + background-size: 18px 18px; + background-repeat: no-repeat; + background-position: center; +} + +.minus-button { + background-size: 24px 6px; + margin-left: 50px; + padding: 0 5px; +} + +.plus-button { + background-size: 24px 24px; + margin-right: 50px; + padding: 0 5px; +} + +#color-scheme-buttons > button { + width: 33%; + border-radius: 4px; + border: 1px solid #BFBFBF; + padding: 10px; + margin: 15px 10px; + font-size: 14px; +} + +#color-scheme-buttons > button:active, +#color-scheme-buttons > button.selected { + border: 2px solid #0A84FF; +} + +.dark-button { + color: #eeeeee; + background-color: #333333; +} + +.auto-button { + color: #000000; + background-color: transparent; +} + +.light-button { + color: #333333; + background-color: #ffffff; +} + +/*======= Toolbar icons =======*/ + +/* desktop-only controls */ +.close-button { + display: none; +} + +.style-button { + background-image: url('chrome://browser/skin/images/reader-style-icon-hdpi.png'); +} + +.minus-button { + background-image: url('chrome://browser/skin/images/reader-minus-hdpi.png'); +} + +.plus-button { + background-image: url('chrome://browser/skin/images/reader-plus-hdpi.png'); +} + +@media screen and (min-resolution: 2dppx) { + .style-button { + background-image: url('chrome://browser/skin/images/reader-style-icon-xhdpi.png'); + } + + .minus-button { + background-image: url('chrome://browser/skin/images/reader-minus-xhdpi.png'); + } + + .plus-button { + background-image: url('chrome://browser/skin/images/reader-plus-xhdpi.png'); + } +} + +@media screen and (min-resolution: 3dppx) { + .style-button { + background-image: url('chrome://browser/skin/images/reader-style-icon-xxhdpi.png'); + } + + .minus-button { + background-image: url('chrome://browser/skin/images/reader-minus-xxhdpi.png'); + } + + .plus-button { + background-image: url('chrome://browser/skin/images/reader-plus-xxhdpi.png'); + } +} + +@media screen and (min-width: 960px) { + .dropdown-popup { + width: 350px; + left: auto; + right: 0; + } +} + +/*======= Article content =======*/ + +/* Note that any class names from the original article that we want to match on + * must be added to CLASSES_TO_PRESERVE in ReaderMode.jsm, so that + * Readability.js doesn't strip them out */ + +#moz-reader-content { + display: none; + font-size: 1em; +} + +#moz-reader-content a { + text-decoration: underline !important; + font-weight: normal; +} + +#moz-reader-content a, +#moz-reader-content a:visited, +#moz-reader-content a:hover, +#moz-reader-content a:active { + color: #00acff !important; +} + +#moz-reader-content * { + max-width: 100% !important; + height: auto !important; +} + +#moz-reader-content p { + line-height: 1.4em !important; + margin: 0px !important; + margin-bottom: 20px !important; +} + +/* Covers all images showing edge-to-edge using a + an optional caption text */ +#moz-reader-content .wp-caption, +#moz-reader-content figure { + display: block !important; + width: 100% !important; + margin: 0px !important; + margin-bottom: 32px !important; +} + +/* Images marked to be shown edge-to-edge with an + optional captio ntext */ +#moz-reader-content p > img:only-child, +#moz-reader-content p > a:only-child > img:only-child, +#moz-reader-content .wp-caption img, +#moz-reader-content figure img { + display: block; + margin-left: auto; + margin-right: auto; +} + +/* Account for body padding to make image full width */ +#moz-reader-content img[moz-reader-full-width] { + width: calc(100% + 40px); + margin-left: -20px; + margin-right: -20px; + max-width: none !important; +} + +/* Image caption text */ +#moz-reader-content .caption, +#moz-reader-content .wp-caption-text, +#moz-reader-content figcaption { + font-size: 0.9em; + font-family: sans-serif; + margin: 0px !important; + padding-top: 4px !important; +} + +/* Ensure all pre-formatted code inside the reader content + are properly wrapped inside content width */ +#moz-reader-content code, +#moz-reader-content pre { + white-space: pre-wrap !important; + margin-bottom: 20px !important; +} + +#moz-reader-content blockquote { + margin: 0px !important; + margin-bottom: 20px !important; + padding: 0px !important; + padding-inline-start: 16px !important; + border: 0px !important; + border-left: 2px solid !important; +} + +#moz-reader-content ul, +#moz-reader-content ol { + margin: 0px !important; + margin-bottom: 20px !important; + padding: 0px !important; + line-height: 1.5em; +} + +#moz-reader-content ul { + padding-inline-start: 30px !important; + list-style: disc !important; +} + +#moz-reader-content ol { + padding-inline-start: 35px !important; + list-style: decimal !important; +} + +/* Hide elements with common "hidden" class names */ +#moz-reader-content .visually-hidden, +#moz-reader-content .visuallyhidden, +#moz-reader-content .hidden, +#moz-reader-content .invisible, +#moz-reader-content .sr-only { + display: none; +} diff --git a/mobile/android/themes/core/aboutReaderContent.css b/mobile/android/themes/core/aboutReaderContent.css deleted file mode 100644 index fe6451df2f52..000000000000 --- a/mobile/android/themes/core/aboutReaderContent.css +++ /dev/null @@ -1,114 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this file, - * You can obtain one at http://mozilla.org/MPL/2.0/. */ - -#moz-reader-content { - display: none; - font-size: 1em; -} - -a { - text-decoration: underline !important; - font-weight: normal; -} - -a, -a:visited, -a:hover, -a:active { - color: #00acff !important; -} - -* { - max-width: 100% !important; - height: auto !important; -} - -p { - line-height: 1.4em !important; - margin: 0px !important; - margin-bottom: 20px !important; -} - -/* Covers all images showing edge-to-edge using a - an optional caption text */ -.wp-caption, -figure { - display: block !important; - width: 100% !important; - margin: 0px !important; - margin-bottom: 32px !important; -} - -/* Images marked to be shown edge-to-edge with an - optional captio ntext */ -p > img:only-child, -p > a:only-child > img:only-child, -.wp-caption img, -figure img { - display: block; - margin-left: auto; - margin-right: auto; -} - -/* Account for body padding to make image full width */ -img[moz-reader-full-width] { - width: calc(100% + 40px); - margin-left: -20px; - margin-right: -20px; - max-width: none !important; -} - -/* Image caption text */ -.caption, -.wp-caption-text, -figcaption { - font-size: 0.9em; - font-family: sans-serif; - margin: 0px !important; - padding-top: 4px !important; -} - -/* Ensure all pre-formatted code inside the reader content - are properly wrapped inside content width */ -code, -pre { - white-space: pre-wrap !important; - margin-bottom: 20px !important; -} - -blockquote { - margin: 0px !important; - margin-bottom: 20px !important; - padding: 0px !important; - padding-inline-start: 16px !important; - border: 0px !important; - border-left: 2px solid !important; -} - -ul, -ol { - margin: 0px !important; - margin-bottom: 20px !important; - padding: 0px !important; - line-height: 1.5em; -} - -ul { - padding-inline-start: 30px !important; - list-style: disc !important; -} - -ol { - padding-inline-start: 35px !important; - list-style: decimal !important; -} - -/* Hide elements with common "hidden" class names */ -.visually-hidden, -.visuallyhidden, -.hidden, -.invisible, -.sr-only { - display: none; -} diff --git a/mobile/android/themes/core/aboutReaderControls.css b/mobile/android/themes/core/aboutReaderControls.css deleted file mode 100644 index 4bfae9cb0da6..000000000000 --- a/mobile/android/themes/core/aboutReaderControls.css +++ /dev/null @@ -1,292 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this file, - * You can obtain one at http://mozilla.org/MPL/2.0/. */ - -#reader-message { - margin-top: 40px; - display: none; - text-align: center; - width: 100%; - font-size: 0.9em; -} - -.header { - text-align: start; - display: none; -} - -.domain, -.credits { - font-size: 0.9em; - font-family: sans-serif; -} - -.domain { - margin-top: 10px; - padding-bottom: 10px; - color: #00acff !important; - text-decoration: none; -} - -.domain-border { - margin-top: 15px; - border-bottom: 1.5px solid #777777; - width: 50%; -} - -.header > h1 { - font-size: 1.33em; - font-weight: 700; - line-height: 1.1em; - width: 100%; - margin: 0px; - margin-top: 32px; - margin-bottom: 16px; - padding: 0px; -} - -.header > .credits { - padding: 0px; - margin: 0px; - margin-bottom: 32px; -} - -/*======= Controls toolbar =======*/ - -.toolbar { - font-family: sans-serif; - position: fixed; - width: 100%; - left: 0; - margin: 0; - padding: 0; - bottom: 0; - list-style: none; - pointer-events: none; - transition: opacity 420ms linear; -} - -.toolbar > * { - float: right; -} - -.button { - width: 56px; - height: 56px; - display: block; - background-position: center; - background-size: 26px 16px; - background-repeat: no-repeat; - background-color: #0979D9; - border-radius: 10000px; - margin: 20px; - border: 0; - box-shadow: 0px 4px 8px 0px rgba(0,0,0,0.40); -} - -.button:active { - background-color: #086ACC; -} - -/* Remove dotted border when button is focused */ -.button::-moz-focus-inner, -.dropdown-popup > div > button::-moz-focus-inner { - border: 0; -} - -.button[hidden], -.toolbar[hidden] { - display: none; -} - -.dropdown-toggle, -#reader-popup { - pointer-events: auto; -} - -.dropdown { - left: 0; - text-align: center; - display: inline-block; - list-style: none; - margin: 0px; - padding: 0px; -} - -/*======= Font style popup =======*/ - -.dropdown-popup { - position: absolute; - left: 0; - width: calc(100% - 30px); - margin: 15px; - z-index: 1000; - background: #EBEBF0; - visibility: hidden; - border: 0; - border-radius: 4px; - box-shadow: 0px 4px 8px 0px rgba(0,0,0,0.40); - -moz-user-select: none; -} - -/* Only used on desktop */ -.dropdown-popup > hr, -.dropdown-arrow, -#font-type-buttons > button > .name, -#content-width-buttons, -#line-height-buttons { - display: none; -} - -.open > .dropdown-popup { - visibility: visible; - bottom: 0; -} - -#font-type-buttons, -#font-size-buttons, -#color-scheme-buttons { - display: flex; - flex-direction: row; -} - -#font-type-buttons > button, -#color-scheme-buttons > button { - text-align: center; -} - -#font-type-buttons > button, -#font-size-buttons > button { - width: 50%; - background-color: transparent; - border: 0; -} - -#font-type-buttons > button { - font-size: 24px; - color: #AFB1B3; - padding: 15px 0; -} - -#font-type-buttons > button:active, -#font-type-buttons > button.selected { - color: #222222; -} - -#font-size-sample { - flex: 0; - font-size: 24px; - color: #000000; - margin: 0 30px; - padding: 0 10px; -} - -.serif-button { - font-family: serif; -} - -.minus-button, -.plus-button { - background-color: transparent; - border: 0; - height: 60px; - background-size: 18px 18px; - background-repeat: no-repeat; - background-position: center; -} - -.minus-button { - background-size: 24px 6px; - margin-left: 50px; - padding: 0 5px; -} - -.plus-button { - background-size: 24px 24px; - margin-right: 50px; - padding: 0 5px; -} - -#color-scheme-buttons > button { - width: 33%; - border-radius: 4px; - border: 1px solid #BFBFBF; - padding: 10px; - margin: 15px 10px; - font-size: 14px; -} - -#color-scheme-buttons > button:active, -#color-scheme-buttons > button.selected { - border: 2px solid #0A84FF; -} - -.dark-button { - color: #eeeeee; - background-color: #333333; -} - -.auto-button { - color: #000000; - background-color: transparent; -} - -.light-button { - color: #333333; - background-color: #ffffff; -} - -/*======= Toolbar icons =======*/ - -/* desktop-only controls */ -.close-button { - display: none; -} - -.style-button { - background-image: url('chrome://browser/skin/images/reader-style-icon-hdpi.png'); -} - -.minus-button { - background-image: url('chrome://browser/skin/images/reader-minus-hdpi.png'); -} - -.plus-button { - background-image: url('chrome://browser/skin/images/reader-plus-hdpi.png'); -} - -@media screen and (min-resolution: 2dppx) { - .style-button { - background-image: url('chrome://browser/skin/images/reader-style-icon-xhdpi.png'); - } - - .minus-button { - background-image: url('chrome://browser/skin/images/reader-minus-xhdpi.png'); - } - - .plus-button { - background-image: url('chrome://browser/skin/images/reader-plus-xhdpi.png'); - } -} - -@media screen and (min-resolution: 3dppx) { - .style-button { - background-image: url('chrome://browser/skin/images/reader-style-icon-xxhdpi.png'); - } - - .minus-button { - background-image: url('chrome://browser/skin/images/reader-minus-xxhdpi.png'); - } - - .plus-button { - background-image: url('chrome://browser/skin/images/reader-plus-xxhdpi.png'); - } -} - -@media screen and (min-width: 960px) { - .dropdown-popup { - width: 350px; - left: auto; - right: 0; - } -} diff --git a/mobile/android/themes/core/jar.mn b/mobile/android/themes/core/jar.mn index 560bb6f319db..c07c0de67b55 100644 --- a/mobile/android/themes/core/jar.mn +++ b/mobile/android/themes/core/jar.mn @@ -15,8 +15,6 @@ chrome.jar: skin/aboutMemory.css (aboutMemory.css) skin/aboutPrivateBrowsing.css (aboutPrivateBrowsing.css) skin/aboutReader.css (aboutReader.css) - skin/aboutReaderContent.css (aboutReaderContent.css) - skin/aboutReaderControls.css (aboutReaderControls.css) skin/aboutSupport.css (aboutSupport.css) skin/config.css (config.css) skin/defines.css (defines.css) @@ -25,8 +23,6 @@ chrome.jar: % override chrome://global/skin/about.css chrome://browser/skin/about.css % override chrome://global/skin/aboutMemory.css chrome://browser/skin/aboutMemory.css % override chrome://global/skin/aboutReader.css chrome://browser/skin/aboutReader.css -% override chrome://global/skin/aboutReaderContent.css chrome://browser/skin/aboutReaderContent.css -% override chrome://global/skin/aboutReaderControls.css chrome://browser/skin/aboutReaderControls.css % override chrome://global/skin/aboutSupport.css chrome://browser/skin/aboutSupport.css % override chrome://global/skin/netError.css chrome://browser/skin/netError.css diff --git a/toolkit/components/narrate/NarrateControls.jsm b/toolkit/components/narrate/NarrateControls.jsm index 35c2b0bccf99..c202ff627d57 100644 --- a/toolkit/components/narrate/NarrateControls.jsm +++ b/toolkit/components/narrate/NarrateControls.jsm @@ -41,13 +41,9 @@ function NarrateControls(mm, win, languagePromise) { dropdown.className = "dropdown"; dropdown.id = "narrate-dropdown"; // We need inline svg here for the animation to work (bug 908634 & 1190881). - // The style animation can't be scoped (bug 830056). // eslint-disable-next-line no-unsanitized/property dropdown.innerHTML = - localize` -