Bug 1624865 - Scope wizard.css to wizard custom element. r=dao

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Tim Nguyen 2020-03-26 13:27:01 +00:00
parent bcca559238
commit db5a590491
4 changed files with 18 additions and 16 deletions

View File

@ -27,4 +27,3 @@
@import url("chrome://global/skin/toolbar.css");
@import url("chrome://global/skin/toolbarbutton.css");
@import url("chrome://global/skin/tree.css");
@import url("chrome://global/skin/wizard.css");

View File

@ -59,14 +59,19 @@
{ mozSystemGroup: true }
);
/*
XXX(ntim): We import button.css here for the wizard-buttons children
This won't be needed after bug 1624888.
*/
this.attachShadow({ mode: "open" }).appendChild(
MozXULElement.parseXULToFragment(`
<html:link rel="stylesheet" href="chrome://global/content/widgets.css" />
<html:link rel="stylesheet" href="chrome://global/skin/button.css"/>
<html:link rel="stylesheet" href="chrome://global/skin/wizard.css"/>
<hbox class="wizard-header"></hbox>
<deck class="wizard-page-box" flex="1">
<slot xmlns="http://www.w3.org/1999/xhtml" name="wizardpage"></slot>
<html:slot name="wizardpage"/>
</deck>
<slot xmlns="http://www.w3.org/1999/xhtml"></slot>
<html:slot/>
<wizard-buttons class="wizard-buttons"></wizard-buttons>
`)
);

View File

@ -4,7 +4,7 @@
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
wizard {
:host {
padding: 14px;
}
@ -28,13 +28,11 @@ wizard {
}
.wizard-header-box-icon {
margin-top: 3px;
margin-inline-end: 20px;
margin-bottom: 0;
margin-inline-start: 3px;
margin-block: 3px 0;
margin-inline: 3px 20px;
}
wizard[branded="true"] .wizard-header-icon {
:host([branded="true"]) .wizard-header-icon {
list-style-image: url("chrome://branding/content/icon48.png");
}

View File

@ -11,10 +11,10 @@
}
.wizard-header-box-1 {
padding: 5px 0px 5px 0px;
padding: 5px 0;
}
wizard[description=""] .wizard-header-description {
:host([description=""]) .wizard-header-description {
display: none;
}
@ -27,7 +27,7 @@ wizard[description=""] .wizard-header-description {
margin-inline-start: 44px;
}
wizard[branded="true"] .wizard-header-icon {
:host([branded="true"]) .wizard-header-icon {
list-style-image: url("chrome://branding/content/icon48.png");
margin-inline-end: 5px;
}
@ -37,7 +37,7 @@ wizard[branded="true"] .wizard-header-icon {
}
.wizard-buttons-separator {
margin-bottom: 0px !important;
margin-bottom: 0 !important;
}
.wizard-buttons-box-2 {
@ -46,9 +46,9 @@ wizard[branded="true"] .wizard-header-icon {
.wizard-button[dlgtype="finish"],
.wizard-button[dlgtype="next"] {
margin-inline-start: 0px !important;
margin-inline-start: 0 !important;
}
.wizard-button[dlgtype="back"] {
margin-inline-end: 0px !important;
margin-inline-end: 0 !important;
}