Bug 1413979 - Remove bogus styles from tree.css on Linux. r=johannh
authorDão Gottwald <dao@mozilla.com>
Thu, 02 Nov 2017 17:28:43 +0100
changeset 434623 db515817640406651cd36558eac1f0e39c4493a9
parent 434622 98b1272e170c8b84fba7d39eaf1c909a4e5f2e34
child 434624 031cd9e534d9926632d96bfdd18912d2b3e596d7
push id117
push userfmarier@mozilla.com
push dateTue, 28 Nov 2017 20:17:16 +0000
reviewersjohannh
bugs1413979
milestone58.0a1
Bug 1413979 - Remove bogus styles from tree.css on Linux. r=johannh There's a bunch of borders that aren't used because of -moz-appearance, and treecols have extra padding that shouldn't be there because -moz-appearance takes care of that. For treecol[dragging="true"] we set color: ThreeDHighlight on the assumption that background-color is ThreeDShadow, but that background-color isn't used either because of -moz-appearance. MozReview-Commit-ID: GNt0vcdawtz
browser/themes/linux/places/places.css
toolkit/themes/linux/global/tree.css
--- a/browser/themes/linux/places/places.css
+++ b/browser/themes/linux/places/places.css
@@ -38,17 +38,16 @@
 #viewButton[open] {
   background: hsla(240, 5%, 5%, 0.15);
 }
 
 .sidebar-placesTree {
   margin: 0;
   color: inherit;
   -moz-appearance: none;
-  border: 0;
   background: transparent;
 }
 
 .sidebar-placesTreechildren::-moz-tree-row {
   min-height: 24px;
 }
 
 :root[uidensity=touch] #search-box,
--- a/toolkit/themes/linux/global/tree.css
+++ b/toolkit/themes/linux/global/tree.css
@@ -6,22 +6,17 @@
   == Styles used by the XUL outline element.
   ======================================================================= */
 
 @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
 
 /* ::::: tree ::::: */
 
 tree {
-  margin: 0px 4px;
-  border: 2px solid;
-  -moz-border-top-colors: ThreeDShadow ThreeDDarkShadow;
-  -moz-border-right-colors: ThreeDHighlight ThreeDLightShadow;
-  -moz-border-bottom-colors: ThreeDHighlight ThreeDLightShadow;
-  -moz-border-left-colors: ThreeDShadow ThreeDDarkShadow;
+  margin: 0 4px;
   background-color: -moz-Field;
   color: -moz-FieldText;
   -moz-appearance: listbox;
 }
 
 /* ::::: tree focusring ::::: */
 
 .focusring > .tree-stack > .tree-rows > .tree-bodybox {
@@ -65,37 +60,37 @@ tree[seltype="cell"] > treechildren::-mo
 tree[seltype="text"] > treechildren::-moz-tree-row {
   border: none;
   background-color: transparent;
 }
 
 /* ::::: tree cells ::::: */
 
 treechildren::-moz-tree-cell {
-  padding: 0px 2px 0px 2px;
+  padding: 0 2px;
 }
 
 tree[seltype="cell"] > treechildren::-moz-tree-cell-text,
 tree[seltype="text"] > treechildren::-moz-tree-cell-text,
 treechildren::-moz-tree-cell-text {
   color: inherit;
 }
 
 treechildren::-moz-tree-cell-text(selected) {
   color: -moz-cellhighlighttext;
 }
 
 tree[seltype="cell"] > treechildren::-moz-tree-cell {
   border: 1px solid transparent;
-  padding: 0px 1px 0px 1px;
+  padding: 0 1px;
 }
 
 tree[seltype="text"] > treechildren::-moz-tree-cell-text {
   border: 1px solid transparent;
-  padding: 0px 1px 1px 1px;
+  padding: 0 1px 1px;
 }
 
 tree[seltype="cell"] > treechildren::-moz-tree-cell(active, selected) {
   background-color: -moz-cellhighlight;
 }
 tree[seltype="cell"] > treechildren::-moz-tree-cell-text(active, selected) {
   color: -moz-cellhighlighttext;
 }
@@ -199,89 +194,40 @@ treechildren::-moz-tree-cell-text(progre
 
 /* ::::: tree columns ::::: */
 
 treecol,
 treecolpicker {
   -moz-appearance: treeheadercell;
   -moz-box-align: center;
   -moz-box-pack: center;
-  border: 2px solid;
-  -moz-border-top-colors: ThreeDHighlight ThreeDLightShadow;
-  -moz-border-right-colors: ThreeDDarkShadow ThreeDShadow;
-  -moz-border-bottom-colors: ThreeDDarkShadow ThreeDShadow;
-  -moz-border-left-colors: ThreeDHighlight ThreeDLightShadow;
-  background-color: -moz-Dialog;
   color: -moz-DialogText;
-  padding: 0px 2px;
 }
 
 treecol:hover,
 treecolpicker:hover {
   color: -moz-buttonhovertext;
 }
 
 .treecol-image {
-  padding: 0px 1px;
+  padding: 0 1px;
 }
 
 .treecol-text {
-  margin: 0px !important;
+  margin: 0 !important;
 }
 
 treecol[hideheader="true"] {
   -moz-appearance: none;
-  border: none;
-  padding: 0;
-}
-
-/* ..... internal box ..... */
-
-treecol:hover:active,
-treecolpicker:hover:active {
-  color: ButtonText;
-  border: 2px solid;
-  -moz-border-top-colors: ThreeDShadow -moz-Dialog;
-  -moz-border-right-colors: ThreeDShadow transparent;
-  -moz-border-bottom-colors: ThreeDShadow transparent;
-  -moz-border-left-colors: ThreeDShadow -moz-Dialog;
-  padding-top: 0px;
-  padding-bottom: 0px;
-  padding-inline-start: 3px;
-  padding-inline-end: 1px;
-}
-
-.treecol-image:hover:active {
-  padding: 0px;
-  padding-inline-start: 2px;
-}
-
-treecol:hover:active .treecol-text {
-  margin: 1px 0px -1px 0px !important;
 }
 
 /* ::::: column drag and drop styles ::::: */
 
 treecol[dragging="true"] {
-  -moz-border-top-colors: ThreeDDarkShadow transparent !important;
-  -moz-border-right-colors: ThreeDDarkShadow transparent!important;
-  -moz-border-bottom-colors: ThreeDDarkShadow transparent !important;
-  -moz-border-left-colors: ThreeDDarkShadow transparent !important;
-  background-color: ThreeDShadow !important;
-  color: ThreeDHighlight !important;
-}
-
-treecol[insertafter="true"]:-moz-locale-dir(ltr),
-treecol[insertbefore="true"]:-moz-locale-dir(rtl) {
-  -moz-border-right-colors: ThreeDDarkShadow ThreeDShadow;
-}
-
-treecol[insertafter="true"]:-moz-locale-dir(rtl),
-treecol[insertbefore="true"]:-moz-locale-dir(ltr) {
-  -moz-border-left-colors: ThreeDDarkShadow ThreeDShadow;
+  color: Graytext;
 }
 
 treechildren::-moz-tree-column(insertbefore) {
   border-inline-start: 1px solid ThreeDShadow;
 }
 
 treechildren::-moz-tree-column(insertafter) {
   border-inline-end: 1px solid ThreeDShadow;
@@ -350,16 +296,12 @@ tree[seltype="text"] > treechildren::-mo
 
 treechildren::-moz-tree-cell-text(active, selected, editing) {
   opacity: 0;
 }
 
 .tree-input {
   -moz-appearance: none;
   border: 1px solid Highlight;
-  -moz-border-top-colors: Highlight;
-  -moz-border-bottom-colors: Highlight;
-  -moz-border-left-colors: Highlight;
-  -moz-border-right-colors: Highlight;
   margin: 0;
   margin-inline-start: -4px;
   padding: 1px;
 }