Bug 1753759 - Eliminate the preprocessor %includes from the preferences CSS. r=dao,preferences-reviewers,mstriemer

* Inline the platform specific rules in a single preferences/dialog.css.
* Inline the platform specific rules in a single preferences/preferences.css.
  Note that the linux and windows .actionButtons margins were not in use - the margins from dialog.css were applied and are correct as-is so this override was removed.
* @import rather than %include the usercontext.css in the containers preferences UI

Differential Revision: https://phabricator.services.mozilla.com/D138979
This commit is contained in:
Sam Foster 2022-02-22 17:13:01 +00:00
Родитель d15f962f85
Коммит 88cb229a60
14 изменённых файлов: 95 добавлений и 128 удалений

Просмотреть файл

@ -23,8 +23,6 @@ browser.jar:
* skin/classic/browser/places/sidebar.css (places/sidebar.css)
skin/classic/browser/places/organizer.css (places/organizer.css)
skin/classic/browser/preferences/alwaysAsk.png (preferences/alwaysAsk.png)
* skin/classic/browser/preferences/preferences.css (preferences/preferences.css)
* skin/classic/browser/preferences/dialog.css (preferences/dialog.css)
skin/classic/browser/preferences/applications.css (preferences/applications.css)
skin/classic/browser/window-controls/close.svg (../windows/window-controls/close.svg)
skin/classic/browser/window-controls/maximize.svg (../windows/window-controls/maximize.svg)

Просмотреть файл

@ -1,9 +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/. */
%include ../../shared/preferences/dialog.inc.css
:root > * {
font-size: 1.05em;
}

Просмотреть файл

@ -1,21 +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/. */
%include ../../shared/preferences/preferences.inc.css
/* Global rules */
body {
font-size: 1.11em;
}
.treecol-sortdirection {
/* override the Linux only toolkit rule */
appearance: none;
}
/* Modeless Window Dialogs */
.actionButtons {
margin: 0 3px 6px;
}

Просмотреть файл

@ -23,8 +23,6 @@ browser.jar:
skin/classic/browser/preferences/alwaysAsk.png (preferences/alwaysAsk.png)
skin/classic/browser/preferences/application.png (preferences/application.png)
skin/classic/browser/preferences/saveFile.png (preferences/saveFile.png)
* skin/classic/browser/preferences/preferences.css (preferences/preferences.css)
* skin/classic/browser/preferences/dialog.css (preferences/dialog.css)
skin/classic/browser/preferences/applications.css (preferences/applications.css)
skin/classic/browser/share.svg (share.svg)
skin/classic/browser/e10s-64@2x.png (../shared/e10s-64@2x.png)

Просмотреть файл

@ -1,13 +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/. */
%include ../../shared/preferences/dialog.inc.css
window {
font: message-box !important;
}
:root > * {
font-size: 1.18em;
}

Просмотреть файл

@ -1,46 +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/. */
%include ../../shared/preferences/preferences.inc.css
body {
font-size: 1.36em;
}
tabpanels {
padding: 20px 7px 7px;
}
#browserUseCurrent,
#browserUseBookmark,
#browserUseBlank {
margin-top: 10px;
}
#advancedPrefs {
margin: 0 8px;
}
#privacyPrefs {
padding: 0 4px;
}
#privacyPrefs > tabpanels {
padding: 18px 10px 10px;
}
#OCSPDialogPane {
font: message-box !important;
}
/**
* Update Preferences
*/
#autoInstallOptions {
margin-inline-start: 20px;
}
.updateControls {
margin-inline-start: 10px;
}

Просмотреть файл

@ -81,6 +81,9 @@
skin/classic/browser/preferences/category-privacy-security.svg (../shared/preferences/category-privacy-security.svg)
skin/classic/browser/preferences/category-search.svg (../shared/preferences/category-search.svg)
skin/classic/browser/preferences/category-sync.svg (../shared/preferences/category-sync.svg)
skin/classic/browser/preferences/containers.css (../shared/preferences/containers.css)
skin/classic/browser/preferences/containers-dialog.css (../shared/preferences/containers-dialog.css)
skin/classic/browser/preferences/dialog.css (../shared/preferences/dialog.css)
skin/classic/browser/preferences/face-sad.svg (../shared/preferences/face-sad.svg)
skin/classic/browser/preferences/face-smile.svg (../shared/preferences/face-smile.svg)
skin/classic/browser/preferences/fxaPairDevice.css (../shared/preferences/fxaPairDevice.css)
@ -90,6 +93,7 @@
skin/classic/browser/preferences/img-vpn.svg (../shared/preferences/img-vpn.svg)
skin/classic/browser/preferences/mozilla-logo.svg (../shared/preferences/mozilla-logo.svg)
skin/classic/browser/preferences/no-search-bar.svg (../shared/preferences/no-search-bar.svg)
skin/classic/browser/preferences/preferences.css (../shared/preferences/preferences.css)
skin/classic/browser/preferences/privacy.css (../shared/preferences/privacy.css)
skin/classic/browser/preferences/rally-logo.svg (../shared/preferences/rally-logo.svg)
skin/classic/browser/preferences/search-arrow-indicator.svg (../shared/preferences/search-arrow-indicator.svg)
@ -97,8 +101,6 @@
skin/classic/browser/preferences/vpn-logo.svg (../shared/preferences/vpn-logo.svg)
skin/classic/browser/preferences/search.css (../shared/preferences/search.css)
skin/classic/browser/preferences/siteDataSettings.css (../shared/preferences/siteDataSettings.css)
* skin/classic/browser/preferences/containers.css (../shared/preferences/containers.css)
* skin/classic/browser/preferences/containers-dialog.css (../shared/preferences/containers-dialog.css)
skin/classic/browser/upgradeDialog.css (../shared/upgradeDialog.css)
skin/classic/browser/spotlight.css (../shared/spotlight.css)
skin/classic/browser/upgradeDialog/abstract.png (../shared/upgradeDialog/abstract.png)

Просмотреть файл

@ -2,7 +2,7 @@
* 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/. */
%include ../../../components/contextualidentity/content/usercontext.css
@import url("chrome://browser/content/usercontext/usercontext.css");
#name {
-moz-box-flex: 1;

Просмотреть файл

@ -2,7 +2,7 @@
* 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/. */
%include ../../../components/contextualidentity/content/usercontext.css
@import url("chrome://browser/content/usercontext/usercontext.css");
#category-containers {
display: none;

Просмотреть файл

@ -2,6 +2,26 @@
- 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/. */
:root > * {
font-size: 1.12em;
}
@media (-moz-platform: macos) {
window {
font: message-box !important;
}
:root > * {
font-size: 1.18em;
}
}
@media (-moz-platform: linux) {
:root > * {
font-size: 1.05em;
}
}
window,
dialog {
appearance: none;

Просмотреть файл

@ -4,6 +4,27 @@
@namespace html "http://www.w3.org/1999/xhtml";
/* Global rules */
* {
user-select: text;
}
body {
font-size: 1.25em;
}
@media (-moz-platform: macos) {
body {
font-size: 1.36em;
}
}
@media (-moz-platform: linux) {
body {
font-size: 1.11em;
}
}
#preferences-root {
text-rendering: optimizeLegibility;
}
@ -31,10 +52,6 @@
--main-pane-width: 664px;
}
* {
user-select: text;
}
/*
The stack has some very tall content but it shouldn't be taller than the
viewport (and we know the tall content will still be accessible via scrollbars
@ -1454,3 +1471,51 @@ richlistitem .text-link:hover {
color: #fbfbfe;
}
}
/* Platform-specific tweaks & overrides */
@media (-moz-platform: macos) {
tabpanels {
padding: 20px 7px 7px;
}
#browserUseCurrent,
#browserUseBookmark,
#browserUseBlank {
margin-top: 10px;
}
#advancedPrefs {
margin: 0 8px;
}
#privacyPrefs {
padding: 0 4px;
}
#privacyPrefs > tabpanels {
padding: 18px 10px 10px;
}
#OCSPDialogPane {
font: message-box !important;
}
/**
* Update Preferences
*/
#autoInstallOptions {
margin-inline-start: 20px;
}
.updateControls {
margin-inline-start: 10px;
}
}
@media (-moz-platform: linux) {
.treecol-sortdirection {
/* override the Linux only toolkit rule */
appearance: none;
}
}

Просмотреть файл

@ -28,8 +28,6 @@ browser.jar:
skin/classic/browser/preferences/alwaysAsk.png (preferences/alwaysAsk.png)
skin/classic/browser/preferences/application.png (preferences/application.png)
skin/classic/browser/preferences/saveFile.png (preferences/saveFile.png)
* skin/classic/browser/preferences/preferences.css (preferences/preferences.css)
* skin/classic/browser/preferences/dialog.css (preferences/dialog.css)
skin/classic/browser/preferences/applications.css (preferences/applications.css)
skin/classic/browser/window-controls/close.svg (window-controls/close.svg)
skin/classic/browser/window-controls/close-highcontrast.svg (window-controls/close-highcontrast.svg)

Просмотреть файл

@ -1,9 +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/. */
%include ../../shared/preferences/dialog.inc.css
:root > * {
font-size: 1.12em;
}

Просмотреть файл

@ -1,16 +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/. */
%include ../../shared/preferences/preferences.inc.css
/* Global rules */
body {
font-size: 1.25em;
}
/* Modeless Window Dialogs */
.actionButtons {
margin: 0 3px 6px;
}