Bug 1374815 - fix sidebar hover styling and unify photon styling with the default, r=nhnt11
authorGijs Kruitbosch <gijskruitbosch@gmail.com>
Mon, 21 Aug 2017 17:37:27 +0100
changeset 427940 4fb65ac5a58719f8afe0fe5e4056f7e8f40ad846
parent 427939 f62dccfbc68e420b1a7538af09374e7edf446b25
child 427941 1f29a8f5c69dd6b0937c3368b7d088454b8e65d1
push id7761
push userjlund@mozilla.com
push dateFri, 15 Sep 2017 00:19:52 +0000
treeherdermozilla-beta@c38455951db4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnhnt11
bugs1374815
milestone57.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1374815 - fix sidebar hover styling and unify photon styling with the default, r=nhnt11 This consolidates the photon styles into the old pre-photon styles, simplifying the CSS. As a result, it fixes the layout of the bookmarks menu as well. There's still some work left to do there to make submenus align properly with their parent once opened on Windows, but that isn't a regression caused by this bug so I am not addressing it here. I have deliberately not updated the checkmark besides aligning it properly on OS X - it seems we need more design details as to how that should look in the sidebar header menu as well as the bookmarks panel before changing that further (if indeed it does need further changes). MozReview-Commit-ID: JPl2VwUh3e1
browser/themes/linux/customizableui/panelUI.css
browser/themes/osx/customizableui/panelUI.css
browser/themes/shared/customizableui/panelUI.inc.css
browser/themes/shared/sidebar.inc.css
browser/themes/windows/customizableui/panelUI.css
--- a/browser/themes/linux/customizableui/panelUI.css
+++ b/browser/themes/linux/customizableui/panelUI.css
@@ -21,43 +21,16 @@
   padding-top: 1px;
 }
 
 /* Add some space at the top because there are no headers: */
 #BMB_bookmarksPopup menupopup > hbox > .popup-internal-box > .arrowscrollbox-scrollbox > .scrollbox-innerbox  {
   padding-top: 4px;
 }
 
-.subviewbutton > .toolbarbutton-text {
-  padding-top: 3px;
-  padding-bottom: 3px;
-}
-
-.widget-overflow-list .toolbarbutton-1 > .toolbarbutton-menubutton-button {
-  -moz-appearance: none;
-  border: 0;
-  margin-inline-start: 3px;
-}
-
-.widget-overflow-list .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker {
-  margin-inline-start: 0;
-}
-
-.subviewbutton > .toolbarbutton-text {
-  padding-inline-start: 16px;
-}
-
-.subviewbutton:-moz-any([image],[targetURI],.cui-withicon, .restoreallitem, .bookmark-item) > .toolbarbutton-text {
-  padding-inline-start: 0;
-}
-
-.subviewbutton:-moz-any([image],[targetURI],.cui-withicon, .restoreallitem, .bookmark-item)[checked="true"] > .toolbarbutton-icon {
-  visibility: hidden;
-}
-
 menuitem.subviewbutton {
   -moz-appearance: none !important;
 }
 
 menu.subviewbutton > .menu-right {
   -moz-appearance: none;
   list-style-image: url(chrome://browser/skin/places/bookmarks-menu-arrow.png);
   -moz-image-region: rect(0, 16px, 16px, 0);
@@ -68,57 +41,22 @@ menu.subviewbutton > .menu-right {
 menu[disabled="true"].subviewbutton > .menu-right {
   -moz-image-region: rect(0, 32px, 16px, 16px);
 }
 
 menu.subviewbutton > .menu-right:-moz-locale-dir(rtl) {
   transform: scaleX(-1);
 }
 
-.subviewbutton > .toolbarbutton-icon {
-  margin-inline-end: 5px;
-}
-
-.subviewbutton > .menu-right,
-.subviewbutton > .menu-iconic-left {
-  padding-top: 1px;
-  /* These need !important to override menu.css */
-  margin-top: 1px !important;
-  margin-bottom: 2px !important;
-}
-
 .subviewradio > .radio-label-box {
   -moz-appearance: none;
 }
 
 /*
  * #pageActionFeedbackAnimatableImage is wider than the panel, and due to a
  * bug in panels on Linux, a box-shadow appears where the image would be if
  * overflow:hidden wasn't applied. Disabling the box-shadow for this panel on
  * Linux works around this issue. This bug is on file as 1394575.
  */
 #pageActionFeedback > .panel-arrowcontainer > .panel-arrowcontent {
   box-shadow: none;
 }
 
-/* START photon adjustments */
-
-photonpanelmultiview .subviewbutton > .toolbarbutton-text,
-photonpanelmultiview .subviewbutton > .toolbarbutton-icon,
-photonpanelmultiview .panel-banner-item > .toolbarbutton-multiline-text {
-  margin: 0;
-}
-
-photonpanelmultiview .subviewbutton > .toolbarbutton-icon {
-  padding: 0;
-}
-
-photonpanelmultiview .subviewbutton:-moz-any([image],[targetURI],.cui-withicon,
-  .restoreallitem, .bookmark-item) > .toolbarbutton-text {
-  padding-inline-start: 8px;
-}
-
-photonpanelmultiview .subviewbutton:-moz-any([image],[targetURI],.cui-withicon,
-  .restoreallitem, .bookmark-item)[checked="true"] > .toolbarbutton-icon {
-  visibility: visible;
-}
-
-/* END photon adjustments */
--- a/browser/themes/osx/customizableui/panelUI.css
+++ b/browser/themes/osx/customizableui/panelUI.css
@@ -3,93 +3,55 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 %include ../../shared/customizableui/panelUI.inc.css
 
 .panel-subviews {
   background-color: hsla(0,0%,100%,.97);
 }
 
-.panelUI-grid .toolbarbutton-1 {
-  margin-right: 0;
-  margin-left: 0;
-  margin-bottom: 0;
-}
-
-.subviewbutton > .toolbarbutton-text {
-  margin: 2px 0 !important; /* !important for overriding toolbarbutton.css */
-}
-
-.subviewbutton:-moz-any([image],[targetURI],.cui-withicon, .bookmark-item) > .toolbarbutton-text {
-  margin: 2px 6px !important; /* !important for overriding toolbarbutton.css */
-}
-
-/* START photon adjustments */
-
-photonpanelmultiview .subviewbutton > .toolbarbutton-text,
-photonpanelmultiview .subviewbutton:-moz-any([image],[targetURI],.cui-withicon, .bookmark-item) > .toolbarbutton-text,
-photonpanelmultiview .panel-banner-item > .toolbarbutton-multiline-text {
-  margin: 0 !important;  /* !important for overriding the rules above. */
-}
-
-/* END photon adjustments */
-
 .restoreallitem > .toolbarbutton-icon {
   display: none;
 }
 
 .subviewbutton {
   padding-inline-start: 18px;
 }
 
 .subviewbutton[checked="true"] {
-  background-position: top 5px left 4px;
+  background-position: top 7px left 4px;
 }
 
 .subviewbutton[checked="true"]:-moz-locale-dir(rtl) {
-  background-position: top 5px right 4px;
+  background-position: top 7px right 4px;
 }
 
 .subviewbutton:not(:-moz-any([image],[targetURI],.cui-withicon, .bookmark-item)) > .menu-iconic-left {
   display: none;
 }
 
-menu.subviewbutton,
-menuitem.subviewbutton:not(.panel-subview-footer) {
-  padding-top: 2px;
-  padding-bottom: 2px;
-}
-
 /* Override OSX-specific toolkit styles for the bookmarks panel */
 menu.subviewbutton > .menu-right {
   margin-inline-end: 0;
   -moz-appearance: none;
 }
 
 menu.subviewbutton > .menu-right > image {
  /* We don't want the arrow to highlight when the .subviewbutton is hovered,
   * so we set the -moz-appearance rule on the image
   * (which doesn't inherit the _moz-menuactive attribute) instead.
   */
   -moz-appearance: menuarrow;
 }
 
-.widget-overflow-list .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker {
-  margin-inline-start: 4px;
-}
-
 .PanelUI-subView menuseparator,
 .cui-widget-panelview menuseparator {
   padding: 0 !important;
 }
 
-toolbarpaletteitem[place="palette"] > .toolbarbutton-1 > .toolbarbutton-menubutton-button {
-  padding: 3px 1px;
-}
-
 #PanelUI-remotetabs-tabslist > label[itemtype="client"] {
   padding-inline-start: 6px;
 }
 
 .PanelUI-remotetabs-notabsforclient-label {
   margin-left: 19px;
   font-size: 13px;
 }
--- a/browser/themes/shared/customizableui/panelUI.inc.css
+++ b/browser/themes/shared/customizableui/panelUI.inc.css
@@ -1187,65 +1187,85 @@ toolbaritem[cui-areatype="menu-panel"][s
   background-color: hsl(109,65%,22%);
 }
 
 #customization-palette .toolbarbutton-multiline-text,
 #customization-palette .toolbarbutton-text {
   display: none;
 }
 
-panelview .toolbarbutton-1,
-.subviewbutton,
-.widget-overflow-list .toolbarbutton-1,
-.panelUI-grid .toolbarbutton-1 > .toolbarbutton-menubutton-button {
-  -moz-appearance: none;
-  padding: 0 6px;
-  background-color: transparent;
-  border-radius: 2px;
-  border-style: solid;
-  border-color: transparent;
-}
-
+.subview-subheader,
 panelview .toolbarbutton-1,
 .subviewbutton,
 .widget-overflow-list .toolbarbutton-1 {
-  border-width: 1px;
+  -moz-appearance: none;
+  margin: 0;
+  min-height: 24px;
+  padding: 4px 12px;
+  background-color: transparent;
+}
+
+.subviewbutton:focus {
+  outline: 0;
+}
+
+.subviewbutton > .toolbarbutton-text {
+  padding: 0;
+  padding-inline-start: 24px; /* This is 16px for the icon + 8px for the padding as defined above. */
+}
+
+.subviewbutton > .menu-right,
+.subviewbutton > .menu-accel-container > .menu-iconic-accel,
+.subviewbutton > .menu-iconic-left,
+.subviewbutton > .menu-iconic-text {
+  padding-bottom: 0;
+  padding-top: 0;
 }
 
-.subviewbutton.panel-subview-footer {
-  border-radius: 0;
-  border: none;
+.subviewbutton-iconic > .toolbarbutton-text,
+.cui-withicon > .toolbarbutton-text,
+.subviewbutton[image] > .toolbarbutton-text,
+.subviewbutton[targetURI] > .toolbarbutton-text,
+.subviewbutton.restoreallitem > .toolbarbutton-text,
+.subviewbutton.bookmark-item > .toolbarbutton-text,
+.subviewbutton[checked="true"] > .toolbarbutton-text {
+  padding-inline-start: 8px; /* See '.subviewbutton-iconic > .toolbarbutton-text' rule above. */
+}
+
+.panel-banner-item > .toolbarbutton-multiline-text {
+  font: menu;
+  margin: 0;
+  padding: 0;
+  padding-inline-start: 8px; /* See '.subviewbutton-iconic > .toolbarbutton-text' rule above. */
+}
+
+.subviewbutton-iconic > .toolbarbutton-icon {
+  width: 16px;
+  height: 16px;
+  -moz-context-properties: fill;
+  fill: currentColor;
+}
+
+/* We don't always display: none this item, and if it has forced width (like above)
+ * or margin, that impacts the position of the label. Fix:
+ */
+.subviewbutton > .toolbarbutton-icon {
+  margin: 0;
 }
 
 .subviewbutton.panel-subview-footer > .menu-text {
   -moz-appearance: none;
-  margin-inline-start: 0px !important;
-  padding-inline-start: 6px;
   padding-inline-end: 6px;
   -moz-box-flex: 0;
-  text-align: center;
-}
-
-.subviewbutton.panel-subview-footer > .toolbarbutton-icon {
-  margin: 0;
-}
-
-panelview:not([mainView]) .subviewbutton.panel-subview-footer > .toolbarbutton-text {
-  text-align: center;
-  padding: 0;
 }
 
 .subviewbutton.panel-subview-footer > .menu-accel-container {
   padding-inline-start: 6px;
 }
 
-.subviewbutton:not(.panel-subview-footer) {
-  margin: 0;
-}
-
 #widget-overflow-fixed-list .toolbarbutton-1 > .toolbarbutton-text,
 #widget-overflow-list .toolbarbutton-1 > .toolbarbutton-text,
 .subviewbutton:not(.panel-subview-footer) > .toolbarbutton-text,
 /* Bookmark items need a more specific selector. */
 .PanelUI-subView .subviewbutton:not(.panel-subview-footer) > .menu-text,
 .PanelUI-subView .subviewbutton:not(.panel-subview-footer) > .menu-iconic-text {
   font: menu;
 }
@@ -1275,65 +1295,18 @@ panelview:not([mainView]) .subviewbutton
 }
 
 /* This is a <label> but it should fit in with the menu font- and colorwise. */
 #PanelUI-characterEncodingView-autodetect-label {
   font: menu;
   color: inherit;
 }
 
-.cui-widget-panelview .subviewbutton:not(.panel-subview-footer) {
-  margin-left: 4px;
-  margin-right: 4px;
-}
-
 /* START photon adjustments */
 
-.widget-overflow-list > toolbarpaletteitem[place=panel] .toolbarbutton-1,
-photonpanelmultiview .widget-overflow-list .toolbarbutton-1,
-photonpanelmultiview .PanelUI-subView .subviewbutton,
-photonpanelmultiview .cui-widget-panelview .subviewbutton:not(.panel-subview-footer),
-photonpanelmultiview .subview-subheader {
-  border-radius: 0;
-  border-width: 0;
-  margin: 0;
-  padding: 4px 12px;
-}
-
-photonpanelmultiview .subviewbutton:focus {
-  outline: 0;
-}
-
-photonpanelmultiview .subviewbutton > .toolbarbutton-text {
-  padding: 0;
-  padding-inline-start: 24px; /* This is 16px for the icon + 8px for the padding as defined above. */
-}
-
-photonpanelmultiview .subviewbutton-iconic > .toolbarbutton-text,
-photonpanelmultiview .cui-withicon > .toolbarbutton-text,
-photonpanelmultiview .subviewbutton[image] > .toolbarbutton-text,
-photonpanelmultiview .subviewbutton[checked="true"] > .toolbarbutton-text {
-  padding-inline-start: 8px; /* See '.subviewbutton-iconic > .toolbarbutton-text' rule above. */
-}
-
-photonpanelmultiview .panel-banner-item > .toolbarbutton-multiline-text {
-  font: menu;
-  padding: 0;
-  padding-inline-start: 8px; /* See '.subviewbutton-iconic > .toolbarbutton-text' rule above. */
-}
-
-photonpanelmultiview .subviewbutton-iconic > .toolbarbutton-icon {
-  width: 16px;
-}
-
-photonpanelmultiview .subviewbutton {
-  -moz-context-properties: fill;
-  fill: currentColor;
-}
-
 photonpanelmultiview .subviewbutton[checked="true"] {
   background: none;
   list-style-image: url(chrome://browser/skin/check.svg);
 }
 
 photonpanelmultiview .subviewbutton > .menu-iconic-left {
   -moz-appearance: none;
   margin-inline-end: 0;
@@ -1401,48 +1374,38 @@ photonpanelmultiview .subview-subheader 
   color: GrayText;
 }
 
 photonpanelmultiview .subview-subheader,
 photonpanelmultiview .panel-subview-footer {
   font: menu;
 }
 
-photonpanelmultiview panelview:not([mainView]) .subviewbutton.panel-subview-footer > .toolbarbutton-text {
-  text-align: start;
-}
-
 /* END photon adjustments */
 
 panelview .toolbarbutton-1 {
   margin-top: 6px;
 }
 
 panelview .toolbarbutton-1@buttonStateHover@,
 toolbarbutton.subviewbutton@buttonStateHover@,
 menu.subviewbutton@menuStateHover@,
 menuitem.subviewbutton@menuStateHover@,
 .widget-overflow-list .toolbarbutton-1@buttonStateHover@,
 .toolbaritem-combined-buttons@inAnyPanel@ > toolbarbutton@buttonStateHover@ {
   background-color: var(--arrowpanel-dimmed);
-  border-color: var(--panel-separator-color);
-}
-
-.toolbaritem-combined-buttons@inAnyPanel@@buttonStateHover@ {
-  border-color: var(--panel-separator-color);
 }
 
 panelview .toolbarbutton-1:-moz-any(@buttonStateActive@,[checked=true]),
 toolbarbutton.subviewbutton@buttonStateActive@,
 menu.subviewbutton@menuStateActive@,
 menuitem.subviewbutton@menuStateActive@,
 .widget-overflow-list .toolbarbutton-1@buttonStateActive@,
 .toolbaritem-combined-buttons@inAnyPanel@ > toolbarbutton@buttonStateActive@ {
   background-color: var(--arrowpanel-dimmed-further);
-  border-color: var(--panel-separator-color);
   box-shadow: 0 1px 0 hsla(210,4%,10%,.03) inset;
 }
 
 .subviewbutton.panel-subview-footer {
   margin: 0;
   background-color: var(--arrowpanel-dimmed);
   border-top: 1px solid var(--panel-separator-color);
   border-radius: 0;
@@ -1705,24 +1668,22 @@ toolbarpaletteitem[place=panel] > .toolb
 toolbaritem[overflowedItem=true],
 .widget-overflow-list .toolbarbutton-1 {
   width: 100%;
   max-width: @wideMenuPanelWidth@;
   background-repeat: no-repeat;
   background-position: 0 center;
 }
 
-.widget-overflow-list .toolbarbutton-1,
-.widget-overflow-list .toolbarbutton-1 > .toolbarbutton-menubutton-button {
+.widget-overflow-list .toolbarbutton-1 {
   -moz-box-align: center;
   -moz-box-orient: horizontal;
 }
 
-.widget-overflow-list .toolbarbutton-1:not(.toolbarbutton-combined) > .toolbarbutton-text,
-.widget-overflow-list .toolbarbutton-1 > .toolbarbutton-menubutton-button > .toolbarbutton-text {
+.widget-overflow-list .toolbarbutton-1:not(.toolbarbutton-combined) > .toolbarbutton-text {
   text-align: start;
   padding-inline-start: .5em;
 }
 
 .subviewbutton[checked="true"] {
   background: url("chrome://global/skin/menu/shared-menu-check.png") center left 7px / 11px 11px no-repeat transparent;
 }
 
@@ -2029,20 +1990,16 @@ menuitem[checked="true"].subviewbutton >
 
   #PanelUI-menu-button[badge-status="update-available"] > .toolbarbutton-badge-stack > .toolbarbutton-badge,
   #PanelUI-menu-button[badge-status="update-manual"] > .toolbarbutton-badge-stack > .toolbarbutton-badge,
   #PanelUI-menu-button[badge-status="update-restart"] > .toolbarbutton-badge-stack > .toolbarbutton-badge {
     border: 1px solid -moz-dialog;
   }
 }
 
-.subviewbutton-iconic > .toolbarbutton-text {
-  padding-inline-start: 5px;
-}
-
 /* START photon adjustments */
 
 .panel-header {
   align-items: center;
   border-bottom: 1px solid var(--panel-separator-color);
   display: flex;
   flex: 1 auto;
   height: 40px; /* fixed item height to prevent flex sizing; height + 2*4px padding */
--- a/browser/themes/shared/sidebar.inc.css
+++ b/browser/themes/shared/sidebar.inc.css
@@ -96,18 +96,19 @@
   display: none;
 }
 
 %ifndef XP_MACOSX
 /* Allow room for the checkbox drawn as a background image at the start of the toolbarbutton */
 #sidebarMenu-popup .subviewbutton-iconic > .toolbarbutton-icon {
   margin-inline-start: 16px;
 }
-#sidebarMenu-popup .subviewbutton-iconic > .toolbarbutton-text {
-  padding-inline-start: 0;
+/* Align items without icons to the start of the icons: */
+#sidebarMenu-popup .subviewbutton:not(.subviewbutton-iconic) > .toolbarbutton-text {
+  padding-inline-start: 16px;
 }
 %endif
 
 
 #sidebar-box[sidebarcommand="viewWebPanelsSidebar"] > #sidebar-header > #sidebar-switcher-target > #sidebar-icon {
   list-style-image: url(chrome://mozapps/skin/places/defaultFavicon.svg);
 }
 
--- a/browser/themes/windows/customizableui/panelUI.css
+++ b/browser/themes/windows/customizableui/panelUI.css
@@ -3,109 +3,57 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 %include ../../shared/customizableui/panelUI.inc.css
 
 .panel-subviews {
   background-color: var(--arrowpanel-background);
 }
 
-#PanelUI-contents #zoom-out-btn {
-  padding-left: 12px;
-  padding-right: 12px;
-}
-
-#PanelUI-contents #zoom-in-btn {
-  padding-left: 12px;
-  padding-right: 12px;
-}
-
 /* bookmark panel submenus */
 
 #BMB_bookmarksPopup menupopup[placespopup=true] {
   -moz-appearance: none;
   background: transparent;
   border: none;
-  padding: 6px;
+  padding: 0;
+  padding-top: 4px;
+  padding-inline-start: 3px;
 }
 
 #BMB_bookmarksPopup menupopup[placespopup=true] > hbox {
   /* emulating chrome://browser/content/places/menu.xml#places-popup-arrow but without the arrow */
   box-shadow: 0 0 4px rgba(0,0,0,0.2);
   background: var(--arrowpanel-background);
   color: var(--arrowpanel-color);
   border: 1px solid var(--arrowpanel-border-color);
   border-radius: 3.5px;
   margin-top: -4px;
 }
 
-#BMB_bookmarksPopup menupopup {
-  padding-top: 2px;
-}
-
 /* Add some space at the top because there are no headers: */
 #BMB_bookmarksPopup menupopup[placespopup=true] > hbox > .popup-internal-box > .arrowscrollbox-scrollbox > .scrollbox-innerbox  {
   padding-top: 4px;
 }
 
 /* bookmark panel separator */
 #BMB_bookmarksPopup menuseparator {
   padding-top: 0;
   padding-bottom: 0;
 }
 
-.subviewbutton > .menu-right,
-.subviewbutton > .menu-iconic-left {
-  padding-top: 1px;
-  margin-top: 1px;
-  margin-bottom: 2px;
-}
-
 /* Disabled empty item looks too small otherwise, because it has no icon. */
 menuitem.subviewbutton[disabled]:not(.menuitem-iconic),
 /* Same for checkbox menu items, whose icons lose size due to -moz-appearance: none: */
 menuitem[type="checkbox"].subviewbutton {
   /* This is 16px for an icon + 3px for its margins + 1px for its padding +
    * 2px for its border, see above */
   min-height: 22px;
 }
 
-.subviewbutton > .toolbarbutton-text {
-  padding-top: 3px;
-  padding-bottom: 3px;
-}
-
-.widget-overflow-list .toolbarbutton-1 > .toolbarbutton-menubutton-button {
-  -moz-appearance: none;
-  border: 0;
-  margin-inline-start: 3px;
-}
-
-.widget-overflow-list .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker {
-  padding: 0 2px;
-  padding-inline-start: 0;
-  height: 18px;
-}
-
-.widget-overflow-list .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker > .dropmarker-icon {
-  padding: 0 6px;
-}
-
-.subviewbutton > .toolbarbutton-text {
-  padding-inline-start: 16px;
-}
-
-.subviewbutton:-moz-any([image],[targetURI],.cui-withicon, .restoreallitem, .bookmark-item) > .toolbarbutton-text {
-  padding-inline-start: 0;
-}
-
-.subviewbutton:-moz-any([image],[targetURI],.cui-withicon, .restoreallitem, .bookmark-item)[checked="true"] > .toolbarbutton-icon {
-  visibility: hidden;
-}
-
 menu.subviewbutton > .menu-right {
   -moz-appearance: none;
   list-style-image: url(chrome://browser/skin/customizableui/menu-arrow.svg);
   -moz-context-properties: fill;
   fill: MenuText;
   /* Reset the rect we inherit from the button: */
   -moz-image-region: auto;
 }
@@ -121,44 +69,17 @@ menu[disabled="true"].subviewbutton > .m
 }
 
 menu.subviewbutton > .menu-right:-moz-locale-dir(rtl) {
   transform: scaleX(-1);
 }
 
 /* Win8 and beyond. */
 @media not all and (-moz-os-version: windows-win7) {
-  panelview .toolbarbutton-1,
-  .subviewbutton,
-  .widget-overflow-list .toolbarbutton-1,
-  .panelUI-grid .toolbarbutton-1 > .toolbarbutton-menubutton-button,
   #BMB_bookmarksPopup menupopup[placespopup=true] > hbox,
   #edit-controls@inAnyPanel@,
   #zoom-controls@inAnyPanel@,
   #edit-controls@inAnyPanel@ > toolbarbutton,
   #zoom-controls@inAnyPanel@ > toolbarbutton {
     border-radius: 0;
   }
 }
 
-/* START photon adjustments */
-
-photonpanelmultiview .subviewbutton > .toolbarbutton-text,
-photonpanelmultiview .subviewbutton > .toolbarbutton-icon,
-photonpanelmultiview .panel-banner-item > .toolbarbutton-multiline-text {
-  margin: 0;
-}
-
-photonpanelmultiview .subviewbutton > .toolbarbutton-icon {
-  padding: 0;
-}
-
-photonpanelmultiview .subviewbutton:-moz-any([image],[targetURI],.cui-withicon,
-  .restoreallitem, .bookmark-item) > .toolbarbutton-text {
-  padding-inline-start: 8px;
-}
-
-photonpanelmultiview .subviewbutton:-moz-any([image],[targetURI],.cui-withicon,
-  .restoreallitem, .bookmark-item)[checked="true"] > .toolbarbutton-icon {
-  visibility: visible;
-}
-
-/* END photon adjustments */