Bug 1314091 - TO FOLD BEFORE LANDING Move pseudo onto descendents;r=Gijs draft
authorBrian Grinstead <bgrinstead@mozilla.com>
Tue, 10 Jan 2017 16:08:10 -0800
changeset 458748 353f6d4f5251de7543785870662306fe4f5e0907
parent 458747 be47205c84485cdae7cecfceebdc85d0d67b1450
child 458749 cc5b9f87dc9acfbc96fcf712228b4759d651b068
push id41047
push userbgrinstead@mozilla.com
push dateWed, 11 Jan 2017 00:17:40 +0000
reviewersGijs
bugs1314091
milestone53.0a1
Bug 1314091 - TO FOLD BEFORE LANDING Move pseudo onto descendents;r=Gijs MozReview-Commit-ID: 8p76rI2vv6v
browser/themes/linux/compacttheme.css
browser/themes/osx/compacttheme.css
browser/themes/shared/compacttheme.inc.css
browser/themes/shared/identity-block/icons.inc.css
browser/themes/shared/identity-block/identity-block.inc.css
browser/themes/windows/compacttheme.css
--- a/browser/themes/linux/compacttheme.css
+++ b/browser/themes/linux/compacttheme.css
@@ -14,18 +14,18 @@
   --urlbar-dropmarker-hover-region: rect(0, 22px, 14px, 11px);
   --urlbar-dropmarker-active-region: rect(0px, 33px, 14px, 22px);
   --urlbar-dropmarker-2x-url: url("chrome://browser/skin/devedition/urlbar-history-dropmarker.svg");
   --urlbar-dropmarker-2x-region: rect(0px, 11px, 14px, 0px);
   --urlbar-dropmarker-hover-2x-region: rect(0, 22px, 14px, 11px);
   --urlbar-dropmarker-active-2x-region: rect(0px, 33px, 14px, 22px);
 }
 
-:root:-moz-lwtheme-brighttext .findbar-closebutton:not(:hover),
-:root:-moz-lwtheme-brighttext #sidebar-header > .close-icon:not(:hover),
+.findbar-closebutton:-moz-lwtheme-brighttext:not(:hover),
+#sidebar-header > .close-icon:-moz-lwtheme-brighttext:not(:hover),
 .tab-close-button[selected]:not(:hover) {
   background-image: -moz-image-rect(url("chrome://global/skin/icons/close.svg"), 0, 80, 16, 64);
 }
 
 /* The menubar and tabs toolbar should match the devedition theme */
 #TabsToolbar,
 #toolbar-menubar {
   -moz-appearance: none !important;
--- a/browser/themes/osx/compacttheme.css
+++ b/browser/themes/osx/compacttheme.css
@@ -101,24 +101,24 @@
   padding-bottom: 3px !important;
 }
 
 #PanelUI-button {
   margin-top: 0;
   margin-bottom: 0;
 }
 
-:root:-moz-lwtheme-brighttext .findbar-closebutton:not(:hover),
+.findbar-closebutton:-moz-lwtheme-brighttext:not(:hover),
 /* Tab styling - make sure to use an inverted icon for the selected tab
    (brighttext only covers the unselected tabs) */
 .tab-close-button[selected=true]:not(:hover) {
   -moz-image-region: rect(0, 64px, 16px, 48px);
 }
 @media (min-resolution: 2dppx) {
-  :root:-moz-lwtheme-brighttext .findbar-closebutton:not(:hover),
+  .findbar-closebutton:-moz-lwtheme-brighttext :not(:hover),
   .tab-close-button[selected=true]:not(:hover) {
     -moz-image-region: rect(0, 128px, 32px, 96px);
   }
 }
 
 .ac-type-icon {
   /* Left-align the type icon in awesomebar popup results with the icon in the
      urlbar. */
--- a/browser/themes/shared/compacttheme.inc.css
+++ b/browser/themes/shared/compacttheme.inc.css
@@ -46,17 +46,17 @@
   --urlbar-dropmarker-2x-url: url("chrome://browser/skin/devedition/urlbar-history-dropmarker.svg");
   --urlbar-dropmarker-2x-region: rect(0px, 11px, 14px, 0px);
   --urlbar-dropmarker-hover-2x-region: rect(0, 22px, 14px, 11px);
   --urlbar-dropmarker-active-2x-region: rect(0px, 33px, 14px, 22px);
 }
 
 /* Override the lwtheme-specific styling for toolbar buttons */
 :root:-moz-lwtheme-brighttext,
-:root:-moz-lwtheme-brighttext toolbar:-moz-lwtheme {
+toolbar:-moz-lwtheme-brighttext  {
   --toolbarbutton-hover-background: rgba(25,33, 38,.6) linear-gradient(rgba(25,33,38,.6), rgba(25,33,38,.6)) padding-box;
   --toolbarbutton-hover-boxshadow: none;
   --toolbarbutton-hover-bordercolor: rgba(25,33,38,.6);
   --toolbarbutton-active-background: rgba(25,33,38,1) linear-gradient(rgba(25,33,38,1), rgba(25,33,38,1)) border-box;
   --toolbarbutton-active-boxshadow: none;
   --toolbarbutton-active-bordercolor: rgba(25,33,38,.8);
   --toolbarbutton-checkedhover-backgroundcolor: #3C5283;
 
@@ -81,17 +81,17 @@
   --tab-selection-color: #f5f7fa;
   --tab-selection-background-color: #4c9ed9;
   --tab-selection-box-shadow: none;
   --pinned-tab-glow: radial-gradient(22px at center calc(100% - 2px), rgba(76,158,217,0.9) 13%, transparent 16%);
 }
 
 /* Override the lwtheme-specific styling for toolbar buttons */
 :root:-moz-lwtheme-darktext,
-:root:-moz-lwtheme-darktext toolbar:-moz-lwtheme {
+toolbar:-moz-lwtheme-darktext {
   --toolbarbutton-hover-background: #eaeaea;
   --toolbarbutton-hover-boxshadow: none;
   --toolbarbutton-hover-bordercolor: rgba(0,0,0,0.1);
   --toolbarbutton-active-background: #d7d7d8 border-box;
   --toolbarbutton-active-boxshadow: none;
   --toolbarbutton-active-bordercolor: rgba(0,0,0,0.15);
   --toolbarbutton-checkedhover-backgroundcolor: #d7d7d8;
 }
@@ -192,37 +192,36 @@ toolbar[brighttext] #downloads-indicator
   background-color: var(--url-and-searchbar-background-color) !important;
   background-image: none !important;
   color: inherit !important;
   border: 1px solid var(--chrome-nav-bar-controls-border-color) !important;
   box-shadow: none !important;
 }
 
 %filter substitution
-%define selectorPrefix :root:-moz-lwtheme-brighttext 
-%define selectorSuffix :-moz-lwtheme
+%define selectorSuffix :-moz-lwtheme-brighttext
 %define iconVariant -white
 %include identity-block/icons.inc.css
 
 #urlbar {
   border-inline-start: none !important;
   opacity: 1 !important;
 }
 
 window:not([chromehidden~="toolbar"]) #urlbar-wrapper {
   overflow: -moz-hidden-unscrollable;
   clip-path: none;
   margin-inline-start: 0;
 }
 
-:root:-moz-lwtheme-brighttext #urlbar-zoom-button:hover {
+#urlbar-zoom-button:-moz-lwtheme-brighttext:hover {
   background-color: rgba(255,255,255,.2);
 }
 
-:root:-moz-lwtheme-brighttext #urlbar-zoom-button:hover:active {
+#urlbar-zoom-button:-moz-lwtheme-brighttext:hover:active {
   background-color: rgba(255,255,255,.3);
 }
 
 /* Nav bar specific stuff */
 #nav-bar {
   margin-top: 0 !important;
   border-top: none !important;
   border-bottom: none !important;
--- a/browser/themes/shared/identity-block/icons.inc.css
+++ b/browser/themes/shared/identity-block/icons.inc.css
@@ -1,62 +1,62 @@
 %if 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/. */
 %endif
 
-@selectorPrefix@#identity-icon@selectorSuffix@ {
+#identity-icon@selectorSuffix@ {
   list-style-image: url(chrome://browser/skin/identity-icon.svg#normal@iconVariant@);
 }
 
-@selectorPrefix@#identity-box:hover > #identity-icon:not(.no-hover)@selectorSuffix@,
-@selectorPrefix@#identity-box[open=true] > #identity-icon@selectorSuffix@ {
+#identity-box:hover > #identity-icon:not(.no-hover)@selectorSuffix@,
+#identity-box[open=true] > #identity-icon@selectorSuffix@ {
   list-style-image: url(chrome://browser/skin/identity-icon.svg#hover@iconVariant@);
 }
 
-@selectorPrefix@#identity-box.grantedPermissions > #identity-icon@selectorSuffix@ {
+#identity-box.grantedPermissions > #identity-icon@selectorSuffix@ {
   list-style-image: url(chrome://browser/skin/identity-icon.svg#notice@iconVariant@);
 }
 
-@selectorPrefix@#identity-box.grantedPermissions:hover > #identity-icon:not(.no-hover)@selectorSuffix@,
-@selectorPrefix@#identity-box.grantedPermissions[open=true] > #identity-icon@selectorSuffix@ {
+#identity-box.grantedPermissions:hover > #identity-icon:not(.no-hover)@selectorSuffix@,
+#identity-box.grantedPermissions[open=true] > #identity-icon@selectorSuffix@ {
   list-style-image: url(chrome://browser/skin/identity-icon.svg#notice-hover@iconVariant@);
 }
 
-@selectorPrefix@#urlbar[pageproxystate="valid"] > #identity-box.chromeUI > #identity-icon@selectorSuffix@ {
+#urlbar[pageproxystate="valid"] > #identity-box.chromeUI > #identity-icon@selectorSuffix@ {
   list-style-image: url(chrome://branding/content/identity-icons-brand.svg);
 }
 
 
-@selectorPrefix@#tracking-protection-icon@selectorSuffix@ {
+#tracking-protection-icon@selectorSuffix@ {
   list-style-image: url(chrome://browser/skin/tracking-protection-16.svg#enabled@iconVariant@);
 }
 
-@selectorPrefix@#tracking-protection-icon[state="loaded-tracking-content"]@selectorSuffix@ {
+#tracking-protection-icon[state="loaded-tracking-content"]@selectorSuffix@ {
   list-style-image: url(chrome://browser/skin/tracking-protection-16.svg#disabled@iconVariant@);
 }
 
 
-@selectorPrefix@#urlbar[pageproxystate="valid"] > #identity-box.verifiedDomain > #connection-icon@selectorSuffix@,
-@selectorPrefix@#urlbar[pageproxystate="valid"] > #identity-box.verifiedIdentity > #connection-icon@selectorSuffix@,
-@selectorPrefix@#urlbar[pageproxystate="valid"] > #identity-box.mixedActiveBlocked > #connection-icon@selectorSuffix@ {
+#urlbar[pageproxystate="valid"] > #identity-box.verifiedDomain > #connection-icon@selectorSuffix@,
+#urlbar[pageproxystate="valid"] > #identity-box.verifiedIdentity > #connection-icon@selectorSuffix@,
+#urlbar[pageproxystate="valid"] > #identity-box.mixedActiveBlocked > #connection-icon@selectorSuffix@ {
   list-style-image: url(chrome://browser/skin/connection-secure.svg);
   visibility: visible;
 }
 
-@selectorPrefix@#urlbar[pageproxystate="valid"] > #identity-box.certUserOverridden > #connection-icon@selectorSuffix@ {
+#urlbar[pageproxystate="valid"] > #identity-box.certUserOverridden > #connection-icon@selectorSuffix@ {
   list-style-image: url(chrome://browser/skin/connection-mixed-passive-loaded.svg#icon@iconVariant@);
   visibility: visible;
 }
 
-@selectorPrefix@#urlbar[pageproxystate="valid"] > #identity-box.insecureLoginForms > #connection-icon@selectorSuffix@,
-@selectorPrefix@#urlbar[pageproxystate="valid"] > #identity-box.mixedActiveContent > #connection-icon@selectorSuffix@ {
+#urlbar[pageproxystate="valid"] > #identity-box.insecureLoginForms > #connection-icon@selectorSuffix@,
+#urlbar[pageproxystate="valid"] > #identity-box.mixedActiveContent > #connection-icon@selectorSuffix@ {
   list-style-image: url(chrome://browser/skin/connection-mixed-active-loaded.svg#icon@iconVariant@);
   visibility: visible;
 }
 
-@selectorPrefix@#urlbar[pageproxystate="valid"] > #identity-box.weakCipher > #connection-icon@selectorSuffix@,
-@selectorPrefix@#urlbar[pageproxystate="valid"] > #identity-box.mixedDisplayContent > #connection-icon@selectorSuffix@,
-@selectorPrefix@#urlbar[pageproxystate="valid"] > #identity-box.mixedDisplayContentLoadedActiveBlocked > #connection-icon@selectorSuffix@ {
+#urlbar[pageproxystate="valid"] > #identity-box.weakCipher > #connection-icon@selectorSuffix@,
+#urlbar[pageproxystate="valid"] > #identity-box.mixedDisplayContent > #connection-icon@selectorSuffix@,
+#urlbar[pageproxystate="valid"] > #identity-box.mixedDisplayContentLoadedActiveBlocked > #connection-icon@selectorSuffix@ {
   list-style-image: url(chrome://browser/skin/connection-mixed-passive-loaded.svg#icon@iconVariant@);
   visibility: visible;
 }
--- a/browser/themes/shared/identity-block/identity-block.inc.css
+++ b/browser/themes/shared/identity-block/identity-block.inc.css
@@ -1,22 +1,20 @@
 %if 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/. */
 %endif
 
 %filter substitution
 
-%define selectorPrefix
 %define selectorSuffix
 %define iconVariant
 %include icons.inc.css
 
-%define selectorPrefix
 %define selectorSuffix :-moz-lwtheme
 %define iconVariant -black
 %include icons.inc.css
 
 #identity-box {
   font-size: .9em;
   padding: 3px 5px;
   overflow: hidden;
--- a/browser/themes/windows/compacttheme.css
+++ b/browser/themes/windows/compacttheme.css
@@ -1,20 +1,16 @@
 % 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/compacttheme.inc.css
 
 :root {
   --forwardbutton-width: 29px;
-}
-
-:root:-moz-lwtheme-brighttext,
-:root:-moz-lwtheme-darktext {
    /* Matches the #browser-border-start, #browser-border-end color */
   --chrome-nav-bar-separator-color: rgba(10, 31, 51, 0.35);
 }
 
 /* The window background is white due to no accentcolor in the lightweight
    theme. It can't be changed to transparent when there is no compositor
    (Win 7 in classic / basic theme), or else dragging and focus become
    broken. So instead just show the normal titlebar in that case, and override
@@ -95,27 +91,27 @@
 .tabbrowser-tab {
   background-color: var(--tab-background-color);
 }
 
 #toolbar-menubar {
   text-shadow: none !important;
 }
 
-:root:-moz-lwtheme-brighttext .findbar-closebutton,
-:root:-moz-lwtheme-brighttext #sidebar-header > .close-icon,
+.findbar-closebutton:-moz-lwtheme-brighttext,
+#sidebar-header > .close-icon:-moz-lwtheme-brighttext,
 /* Tab styling - make sure to use an inverted icon for the selected tab
    (brighttext only covers the unselected tabs) */
 .tab-close-button[selected=true] {
   list-style-image: url("chrome://global/skin/icons/close-inverted.png");
 }
 
 @media (min-resolution: 1.1dppx) {
-  :root:-moz-lwtheme-brighttext .findbar-closebutton,
-  :root:-moz-lwtheme-brighttext #sidebar-header > .close-icon,
+  .findbar-closebutton:-moz-lwtheme-brighttext,
+  #sidebar-header > .close-icon:-moz-lwtheme-brighttext,
   .tab-close-button[selected=true] {
     list-style-image: url("chrome://global/skin/icons/close-inverted@2x.png");
   }
 }
 
 @media (-moz-os-version: windows-win7),
        (-moz-os-version: windows-win8) {
   :root {
@@ -274,44 +270,43 @@
 @media (-moz-os-version: windows-win10) {
   /* Always keep draggable space on the sides of tabs since there is no top margin on Win10 */
   #main-window .tabbrowser-arrowscrollbox > .arrowscrollbox-scrollbox {
     padding-left: 15px;
     padding-right: 15px;
   }
 
   /* Force white caption buttons for the dark theme on Windows 10 */
-  :root:-moz-lwtheme-brighttext #titlebar-min {
+  #titlebar-min:-moz-lwtheme-brighttext {
     list-style-image: url(chrome://browser/skin/caption-buttons.svg#minimize-white);
   }
-  :root:-moz-lwtheme-brighttext #titlebar-max {
+  #titlebar-max:-moz-lwtheme-brighttext {
     list-style-image: url(chrome://browser/skin/caption-buttons.svg#maximize-white);
   }
-  #main-window:-moz-lwtheme-brighttext[sizemode="maximized"] #titlebar-max {
+  #main-window[sizemode="maximized"] #titlebar-max:-moz-lwtheme-brighttext {
     list-style-image: url(chrome://browser/skin/caption-buttons.svg#restore-white);
   }
-  :root:-moz-lwtheme-brighttext #titlebar-close {
+  #titlebar-close:-moz-lwtheme-brighttext {
     list-style-image: url(chrome://browser/skin/caption-buttons.svg#close-white);
   }
 
   /* ... and normal ones for the light theme on Windows 10 */
-  :root:-moz-lwtheme-darktext #titlebar-min {
+  #titlebar-min:-moz-lwtheme-darktext {
     list-style-image: url(chrome://browser/skin/caption-buttons.svg#minimize);
   }
-  :root:-moz-lwtheme-darktext #titlebar-max {
+  #titlebar-max:-moz-lwtheme-darktext {
     list-style-image: url(chrome://browser/skin/caption-buttons.svg#maximize);
   }
-  #main-window:-moz-lwtheme-darktext[sizemode="maximized"] #titlebar-max {
+  #main-window[sizemode="maximized"] #titlebar-max:-moz-lwtheme-darktext {
     list-style-image: url(chrome://browser/skin/caption-buttons.svg#restore);
   }
-  :root:-moz-lwtheme-darktext #titlebar-close {
+  #titlebar-close:-moz-lwtheme-darktext {
     list-style-image: url(chrome://browser/skin/caption-buttons.svg#close);
   }
-
-  :root:-moz-lwtheme-darktext #titlebar-close:hover {
+  #titlebar-close:-moz-lwtheme-darktext:hover {
     list-style-image: url(chrome://browser/skin/caption-buttons.svg#close-white);
   }
 }
 
 .ac-type-icon {
   /* Left-align the type icon in awesomebar popup results with the icon in the
      urlbar. */
   margin-inline-start: 13px;