Bug 1583403 - Remove default namespace from various global.css files. r=dao

Makes it easier to share this CSS with HTML namespaced files.

Differential Revision: https://phabricator.services.mozilla.com/D46882

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Brendan Dahl 2019-10-02 18:10:53 +00:00
Родитель 5d27394460
Коммит 4f80accf77
5 изменённых файлов: 77 добавлений и 95 удалений

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

@ -10,7 +10,7 @@
@import url("chrome://global/locale/intl.css"); @import url("chrome://global/locale/intl.css");
@import url("chrome://global/content/widgets.css"); @import url("chrome://global/content/widgets.css");
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); @namespace xul url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
@namespace html url("http://www.w3.org/1999/xhtml"); @namespace html url("http://www.w3.org/1999/xhtml");
%include ../../shared/global.inc.css %include ../../shared/global.inc.css
@ -18,13 +18,13 @@
/* ::::: XBL bindings ::::: */ /* ::::: XBL bindings ::::: */
@media (-moz-menubar-drag) { @media (-moz-menubar-drag) {
toolbar[type="menubar"] { xul|toolbar[type="menubar"] {
-moz-window-dragging: drag; -moz-window-dragging: drag;
} }
} }
/* ::::: Variables ::::: */
:root { :root {
/* ::::: Variables ::::: */
--default-arrowpanel-background: -moz-field; --default-arrowpanel-background: -moz-field;
--default-arrowpanel-color: -moz-fieldText; --default-arrowpanel-color: -moz-fieldText;
--default-arrowpanel-border-color: ThreeDShadow; --default-arrowpanel-border-color: ThreeDShadow;
@ -33,13 +33,7 @@
--arrowpanel-border-color: var(--default-arrowpanel-border-color); --arrowpanel-border-color: var(--default-arrowpanel-border-color);
--arrowpanel-padding: 10px; --arrowpanel-padding: 10px;
--panel-disabled-color: GrayText; --panel-disabled-color: GrayText;
} /* ::::: Styles ::::: */
/* ::::: root elements ::::: */
window,
dialog,
wizard {
-moz-appearance: dialog; -moz-appearance: dialog;
background-color: -moz-Dialog; background-color: -moz-Dialog;
color: -moz-DialogText; color: -moz-DialogText;
@ -71,7 +65,7 @@ wizard {
/* ::::: iframe ::::: */ /* ::::: iframe ::::: */
iframe { xul|iframe {
border: none; border: none;
width: 100px; width: 100px;
height: 100px; height: 100px;
@ -81,7 +75,7 @@ iframe {
@supports -moz-bool-pref("layout.css.emulate-moz-box-with-flex") { @supports -moz-bool-pref("layout.css.emulate-moz-box-with-flex") {
/* In emulation, <iframe> is block instead of inline, so reset the width/height */ /* In emulation, <iframe> is block instead of inline, so reset the width/height */
iframe { xul|iframe {
width: auto; width: auto;
height: auto; height: auto;
} }
@ -89,16 +83,16 @@ iframe {
/* XXXBlake yeah, shoot me -- these don't belong here. I'll move them later. */ /* XXXBlake yeah, shoot me -- these don't belong here. I'll move them later. */
sidebarheader { xul|sidebarheader {
min-height: 25px; min-height: 25px;
text-shadow: none; text-shadow: none;
} }
sidebarheader > label { xul|sidebarheader > xul|label {
padding-inline-start: 4px; padding-inline-start: 4px;
} }
toolbar[mode="text"] .toolbarbutton-text { xul|toolbar[mode="text"] .toolbarbutton-text {
padding: 0 !important; padding: 0 !important;
margin: 3px 5px !important; margin: 3px 5px !important;
} }
@ -146,28 +140,28 @@ html|*#print-preview-pageNumber {
text-shadow: 1px 1px 1.5px black; text-shadow: 1px 1px 1.5px black;
} }
separator:not([orient="vertical"]) { xul|separator:not([orient="vertical"]) {
height: 1.5em; height: 1.5em;
} }
separator[orient="vertical"] { xul|separator[orient="vertical"] {
width: 1.5em; width: 1.5em;
} }
separator.thin:not([orient="vertical"]) { xul|separator.thin:not([orient="vertical"]) {
height: 0.5em; height: 0.5em;
} }
separator.thin[orient="vertical"] { xul|separator.thin[orient="vertical"] {
width: 0.5em; width: 0.5em;
} }
separator.groove:not([orient="vertical"]) { xul|separator.groove:not([orient="vertical"]) {
border-top: 1px solid ThreeDShadow; border-top: 1px solid ThreeDShadow;
border-bottom: 1px solid ThreeDHighlight; border-bottom: 1px solid ThreeDHighlight;
height: 0; height: 0;
margin-top: 0.4em; margin-top: 0.4em;
margin-bottom: 0.4em; margin-bottom: 0.4em;
} }
separator.groove[orient="vertical"] { xul|separator.groove[orient="vertical"] {
border-left: 1px solid ThreeDShadow; border-left: 1px solid ThreeDShadow;
border-right: 1px solid ThreeDHighlight; border-right: 1px solid ThreeDHighlight;
width: 0; width: 0;
@ -175,8 +169,8 @@ separator.groove[orient="vertical"] {
margin-right: 0.4em; margin-right: 0.4em;
} }
description, xul|description,
label { xul|label {
cursor: default; cursor: default;
margin-top: 1px; margin-top: 1px;
margin-bottom: 2px; margin-bottom: 2px;
@ -184,11 +178,11 @@ label {
margin-inline-end: 5px; margin-inline-end: 5px;
} }
description { xul|description {
margin-bottom: 4px; margin-bottom: 4px;
} }
label[disabled="true"] { xul|label[disabled="true"] {
color: GrayText; color: GrayText;
} }
@ -225,12 +219,12 @@ html|input {
margin: 2px 4px; /* matches xul <textbox> default margin */ margin: 2px 4px; /* matches xul <textbox> default margin */
} }
notification > hbox > button { xul|notification > xul|hbox > xul|button {
margin-top: 0; margin-top: 0;
margin-bottom: 0; margin-bottom: 0;
} }
popupnotificationcontent { xul|popupnotificationcontent {
margin-top: .5em; margin-top: .5em;
} }

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

@ -7,13 +7,13 @@
@import url("chrome://global/content/widgets.css"); @import url("chrome://global/content/widgets.css");
%include shared.inc %include shared.inc
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); @namespace xul url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
@namespace html url("http://www.w3.org/1999/xhtml"); @namespace html url("http://www.w3.org/1999/xhtml");
%include ../../shared/global.inc.css %include ../../shared/global.inc.css
/* ::::: Variables ::::: */
:root { :root {
/* ::::: Variables ::::: */
--arrowpanel-padding: 16px; --arrowpanel-padding: 16px;
--default-arrowpanel-background: #fff; --default-arrowpanel-background: #fff;
--default-arrowpanel-color: hsl(0,0%,10%); --default-arrowpanel-color: hsl(0,0%,10%);
@ -25,13 +25,7 @@
--panel-disabled-color: GrayText; --panel-disabled-color: GrayText;
--focus-ring-box-shadow: @focusRingShadow@; --focus-ring-box-shadow: @focusRingShadow@;
} /* ::::: Styles ::::: */
/* ::::: root elements ::::: */
window,
dialog,
wizard {
-moz-appearance: dialog; -moz-appearance: dialog;
background-color: #FFFFFF; background-color: #FFFFFF;
color: -moz-DialogText; color: -moz-DialogText;
@ -69,7 +63,7 @@ wizard {
/* ::::: iframe ::::: */ /* ::::: iframe ::::: */
iframe { xul|iframe {
border: none; border: none;
width: 100px; width: 100px;
height: 100px; height: 100px;
@ -79,7 +73,7 @@ iframe {
@supports -moz-bool-pref("layout.css.emulate-moz-box-with-flex") { @supports -moz-bool-pref("layout.css.emulate-moz-box-with-flex") {
/* In emulation, <iframe> is block instead of inline, so reset the width/height */ /* In emulation, <iframe> is block instead of inline, so reset the width/height */
iframe { xul|iframe {
width: auto; width: auto;
height: auto; height: auto;
} }
@ -87,7 +81,7 @@ iframe {
/* ::::: miscellaneous formatting ::::: */ /* ::::: miscellaneous formatting ::::: */
sidebarheader { xul|sidebarheader {
background-color: -moz-Dialog; background-color: -moz-Dialog;
color: -moz-dialogText; color: -moz-dialogText;
text-shadow: none; text-shadow: none;
@ -105,35 +99,35 @@ sidebarheader {
text-shadow: 1px 1px 1.5px black; text-shadow: 1px 1px 1.5px black;
} }
separator:not([orient="vertical"]) { xul|separator:not([orient="vertical"]) {
height: 1.5em; height: 1.5em;
} }
separator[orient="vertical"] { xul|separator[orient="vertical"] {
width: 1.5em; width: 1.5em;
} }
separator.thin:not([orient="vertical"]) { xul|separator.thin:not([orient="vertical"]) {
height: 0.5em; height: 0.5em;
} }
separator.thin[orient="vertical"] { xul|separator.thin[orient="vertical"] {
width: 0.5em; width: 0.5em;
} }
separator.groove:not([orient="vertical"]) { xul|separator.groove:not([orient="vertical"]) {
border-top: 1px solid #A3A3A3; border-top: 1px solid #A3A3A3;
height: 0; height: 0;
margin-top: 0.4em; margin-top: 0.4em;
margin-bottom: 0.4em; margin-bottom: 0.4em;
} }
separator.groove[orient="vertical"] { xul|separator.groove[orient="vertical"] {
border-left: 1px solid #A3A3A3; border-left: 1px solid #A3A3A3;
width: 0; width: 0;
margin-left: 0.4em; margin-left: 0.4em;
margin-right: 0.4em; margin-right: 0.4em;
} }
description, xul|description,
label { xul|label {
cursor: default; cursor: default;
margin-top: 1px; margin-top: 1px;
margin-bottom: 2px; margin-bottom: 2px;
@ -141,11 +135,11 @@ label {
margin-inline-end: 5px; margin-inline-end: 5px;
} }
description { xul|description {
margin-bottom: 4px; margin-bottom: 4px;
} }
label[disabled="true"] { xul|label[disabled="true"] {
color: GrayText; color: GrayText;
} }
@ -182,7 +176,7 @@ html|input {
margin: 4px; /* matches xul <textbox> default margin */ margin: 4px; /* matches xul <textbox> default margin */
} }
notification > hbox > button { xul|notification > xul|hbox > xul|button {
margin: 0 3px; margin: 0 3px;
padding: 1px 10px; padding: 1px 10px;
min-width: 60px; min-width: 60px;
@ -196,25 +190,25 @@ notification > hbox > button {
box-shadow: @roundButtonShadow@; box-shadow: @roundButtonShadow@;
} }
notification > hbox > button:active:hover { xul|notification > xul|hbox > xul|button:active:hover {
color: @roundButtonColor@; color: @roundButtonColor@;
background: @roundButtonPressedBackgroundImage@; background: @roundButtonPressedBackgroundImage@;
box-shadow: @roundButtonPressedShadow@; box-shadow: @roundButtonPressedShadow@;
} }
notification > hbox > button:-moz-focusring { xul|notification > xul|hbox > xul|button:-moz-focusring {
box-shadow: var(--focus-ring-box-shadow), @roundButtonShadow@; box-shadow: var(--focus-ring-box-shadow), @roundButtonShadow@;
} }
notification > hbox > button:active:hover:-moz-focusring { xul|notification > xul|hbox > xul|button:active:hover:-moz-focusring {
box-shadow: var(--focus-ring-box-shadow), @roundButtonPressedShadow@; box-shadow: var(--focus-ring-box-shadow), @roundButtonPressedShadow@;
} }
notification > hbox > button > .button-box > .button-text { xul|notification > xul|hbox > xul|button > .button-box > .button-text {
margin: 0 !important; margin: 0 !important;
} }
popupnotificationcontent { xul|popupnotificationcontent {
margin-top: .5em; margin-top: .5em;
} }

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

@ -45,7 +45,7 @@
onload="loaded()"> onload="loaded()">
<html:style><![CDATA[ <html:style><![CDATA[
window { :root {
-moz-appearance: none; -moz-appearance: none;
background-color: white; background-color: white;
} }

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

@ -70,7 +70,7 @@ html|textarea {
background-color: var(--arrowpanel-dimmed); background-color: var(--arrowpanel-dimmed);
} }
.panel-footer > button { .panel-footer > xul|button {
-moz-appearance: none; -moz-appearance: none;
border-top: 1px solid var(--panel-separator-color); border-top: 1px solid var(--panel-separator-color);
/* !important overrides :hover and :active colors from button.css: */ /* !important overrides :hover and :active colors from button.css: */
@ -80,38 +80,38 @@ html|textarea {
padding: .9em 2px; padding: .9em 2px;
} }
.panel-footer > button[disabled] { .panel-footer > xul|button[disabled] {
color: var(--panel-disabled-color) !important; color: var(--panel-disabled-color) !important;
} }
.panel-footer > button:-moz-focusring { .panel-footer > xul|button:-moz-focusring {
outline: 1px dotted; outline: 1px dotted;
outline-offset: -3px; outline-offset: -3px;
} }
.panel-footer > button:not([disabled]):hover { .panel-footer > xul|button:not([disabled]):hover {
background-color: var(--arrowpanel-dimmed); background-color: var(--arrowpanel-dimmed);
} }
.panel-footer > button:not([disabled]):hover:active, .panel-footer > xul|button:not([disabled]):hover:active,
.panel-footer > button:not([disabled])[open] { .panel-footer > xul|button:not([disabled])[open] {
background-color: var(--arrowpanel-dimmed-further); background-color: var(--arrowpanel-dimmed-further);
box-shadow: 0 1px 0 hsla(210,4%,10%,.05) inset; box-shadow: 0 1px 0 hsla(210,4%,10%,.05) inset;
} }
.panel-footer > button:not([disabled])[default] { .panel-footer > xul|button:not([disabled])[default] {
color: white !important; color: white !important;
background-color: #0060df; background-color: #0060df;
} }
.panel-footer > button:not([disabled])[default]:hover { .panel-footer > xul|button:not([disabled])[default]:hover {
background-color: #003eaa; background-color: #003eaa;
} }
.panel-footer > button:not([disabled])[default]:hover:active { .panel-footer > xul|button:not([disabled])[default]:hover:active {
background-color: #002275; background-color: #002275;
} }
.panel-footer > button > .button-box { .panel-footer > xul|button > .button-box {
padding: 0; padding: 0;
} }

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

@ -10,13 +10,13 @@
@import url("chrome://global/locale/intl.css"); @import url("chrome://global/locale/intl.css");
@import url("chrome://global/content/widgets.css"); @import url("chrome://global/content/widgets.css");
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); @namespace xul url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
@namespace html url("http://www.w3.org/1999/xhtml"); @namespace html url("http://www.w3.org/1999/xhtml");
%include ../../shared/global.inc.css %include ../../shared/global.inc.css
/* ::::: Variables ::::: */
:root { :root {
/* ::::: Variables ::::: */
--arrowpanel-padding: 10px; --arrowpanel-padding: 10px;
--default-arrowpanel-background: -moz-field; --default-arrowpanel-background: -moz-field;
--default-arrowpanel-color: -moz-fieldText; --default-arrowpanel-color: -moz-fieldText;
@ -25,6 +25,10 @@
--arrowpanel-color: var(--default-arrowpanel-color); --arrowpanel-color: var(--default-arrowpanel-color);
--arrowpanel-border-color: var(--default-arrowpanel-border-color); --arrowpanel-border-color: var(--default-arrowpanel-border-color);
--panel-disabled-color: GrayText; --panel-disabled-color: GrayText;
/* ::::: Styles ::::: */
background-color: -moz-Dialog;
color: -moz-DialogText;
font: message-box;
} }
@media (-moz-windows-default-theme) { @media (-moz-windows-default-theme) {
@ -33,16 +37,6 @@
} }
} }
/* ::::: root elements ::::: */
window,
dialog,
wizard {
background-color: -moz-Dialog;
color: -moz-DialogText;
font: message-box;
}
/* ::::: alert icons :::::*/ /* ::::: alert icons :::::*/
.message-icon, .message-icon,
@ -74,7 +68,7 @@ wizard {
/* ::::: iframe ::::: */ /* ::::: iframe ::::: */
iframe { xul|iframe {
border: none; border: none;
width: 100px; width: 100px;
height: 100px; height: 100px;
@ -84,7 +78,7 @@ iframe {
@supports -moz-bool-pref("layout.css.emulate-moz-box-with-flex") { @supports -moz-bool-pref("layout.css.emulate-moz-box-with-flex") {
/* In emulation, <iframe> is block instead of inline, so reset the width/height */ /* In emulation, <iframe> is block instead of inline, so reset the width/height */
iframe { xul|iframe {
width: auto; width: auto;
height: auto; height: auto;
} }
@ -92,16 +86,16 @@ iframe {
/* XXXBlake yeah, shoot me -- these don't belong here. I'll move them later. */ /* XXXBlake yeah, shoot me -- these don't belong here. I'll move them later. */
sidebarheader { xul|sidebarheader {
min-height: 25px; min-height: 25px;
text-shadow: none; text-shadow: none;
} }
sidebarheader > label { xul|sidebarheader > xul|label {
padding-inline-start: 4px; padding-inline-start: 4px;
} }
toolbar[mode="text"] .toolbarbutton-text { xul|toolbar[mode="text"] .toolbarbutton-text {
padding: 0 !important; padding: 0 !important;
margin: 3px 5px !important; margin: 3px 5px !important;
} }
@ -148,28 +142,28 @@ html|*#print-preview-pageNumber {
} }
/* separators */ /* separators */
separator:not([orient="vertical"]) { xul|separator:not([orient="vertical"]) {
height: 1.5em; height: 1.5em;
} }
separator[orient="vertical"] { xul|separator[orient="vertical"] {
width: 1.5em; width: 1.5em;
} }
separator.thin:not([orient="vertical"]) { xul|separator.thin:not([orient="vertical"]) {
height: 0.5em; height: 0.5em;
} }
separator.thin[orient="vertical"] { xul|separator.thin[orient="vertical"] {
width: 0.5em; width: 0.5em;
} }
separator.groove:not([orient="vertical"]) { xul|separator.groove:not([orient="vertical"]) {
border-top: 1px solid ThreeDShadow; border-top: 1px solid ThreeDShadow;
border-bottom: 1px solid ThreeDHighlight; border-bottom: 1px solid ThreeDHighlight;
height: 0; height: 0;
margin-top: 0.4em; margin-top: 0.4em;
margin-bottom: 0.4em; margin-bottom: 0.4em;
} }
separator.groove[orient="vertical"] { xul|separator.groove[orient="vertical"] {
border-left: 1px solid ThreeDShadow; border-left: 1px solid ThreeDShadow;
border-right: 1px solid ThreeDHighlight; border-right: 1px solid ThreeDHighlight;
width: 0; width: 0;
@ -177,8 +171,8 @@ separator.groove[orient="vertical"] {
margin-right: 0.4em; margin-right: 0.4em;
} }
description, xul|description,
label { xul|label {
cursor: default; cursor: default;
margin-top: 1px; margin-top: 1px;
margin-bottom: 2px; margin-bottom: 2px;
@ -186,16 +180,16 @@ label {
margin-inline-end: 5px; margin-inline-end: 5px;
} }
description { xul|description {
margin-bottom: 4px; margin-bottom: 4px;
} }
label[disabled="true"] { xul|label[disabled="true"] {
color: GrayText; color: GrayText;
} }
@media (-moz-windows-classic) { @media (-moz-windows-classic) {
label[disabled="true"] { xul|label[disabled="true"] {
color: ThreeDShadow; color: ThreeDShadow;
text-shadow: 1px 1px ThreeDHighlight; text-shadow: 1px 1px ThreeDHighlight;
} }
@ -234,7 +228,7 @@ html|input {
margin: 2px 4px; /* matches xul <textbox> default margin */ margin: 2px 4px; /* matches xul <textbox> default margin */
} }
popupnotificationcontent { xul|popupnotificationcontent {
margin-top: .5em; margin-top: .5em;
} }