fix some parsing errors etc. and make new HTML-based buttons with ::before work in...
[themes.git] / LCARStrek / global / listbox.css
index e0f27f6147b1c39224e0368eaa140f8cd9beb36c..5bc4be856107eee29abff4e43eb4c575b1f980c1 100644 (file)
@@ -1,27 +1,6 @@
-/*
- * The contents of this file are subject to the Netscape Public
- * License Version 1.1 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.mozilla.org/NPL/
- *
- * Software distributed under the License is distributed on an "AS
- * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
- * implied. See the License for the specific language governing
- * rights and limitations under the License.
- *
- * The Original Code is Mozilla Communicator client code, released
- * March 31, 1998.
- *
- * The Initial Developer of the Original Code is Netscape
- * Communications Corporation. Portions created by Netscape are
- * Copyright (C) 1998-2001 Netscape Communications Corporation. All
- * Rights Reserved.
- *
- * Contributor(s):
- *   Joe Hewitt (hewitt@netscape.com)
- *   Dean Tessman (dean_tessman@hotmail.com)
- *   Robert Kaiser <KaiRo@KaiRo.at>
- */
+/* 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/. */
 
 /* ===== listbox.css =======================================================
   == Styles used by XUL listbox-related elements.
@@ -32,7 +11,7 @@
 /* ::::: listbox ::::: */
 
 listbox {
-  -moz-border-radius: 5px;
+  border-radius: 5px;
   margin: 1px 2px;
   padding: 0px;
   border: 1px solid #9C9CFF;
@@ -49,38 +28,57 @@ listbox[disabled="true"] {
 
 listitem {
   border: 1px solid transparent;
+
+  --listitem-selectedColor: #000000;
+  --listitem-selectedBackground: #008484;
+  --listitem-selectedFocusColor: #FFCF00;
+  --listitem-selectedFocusBackground: var(--listitem-selectedBackground);
+  --listitem-focusCurrentBorder: #FF9F00;
+  --listitem-selectedFocusCurrentBorder: var(--listitem-focusCurrentBorder);
 }
 
-listbox:focus > listitem[current="true"] {
-  border: 1px dotted #FF9F00;
+listbox:-moz-focusring > listitem[current="true"] {
+  border: 1px dotted var(--listitem-focusCurrentBorder);
 }
 
-listbox:focus > listitem[current="true"][selected="true"] {
-  border: 1px dotted #FF9F00;
+listbox:-moz-focusring > listitem[current="true"][selected="true"] {
+  border: 1px dotted var(--listitem-selectedFocusCurrentBorder);
 }
 
 listitem[selected="true"] {
-  background-color: #008484;
-  color: #000000;
+  background-color: var(--listitem-selectedBackground);
+  color: var(--listitem-selectedColor);
 }
 
 listbox:focus > listitem[selected="true"] {
-  background-color: #008484;
-  color: #FFCF00;
+  background-color: var(--listitem-selectedFocusBackground);
+  color: var(--listitem-selectedFocusColor);
 }
 
 /* ::::: listheader ::::: */
 
 listheader {
   -moz-box-align: center;
-  border: 1px solid #FFCF00;
+  border: 1px solid #FF9F00;
+  border-top-left-radius: 3px;
+  border-top-right-radius: 3px;
   background-color: #9C9CFF;
   color: #000000;
-  padding: 0 4px;
+  padding: 0;
+}
+
+listheader > treecol {
+  -moz-border-start: none;
+  border-top: none;
+  border-bottom: none;
+}
+
+listheader > treecol:last-child {
+  -moz-border-end: none;
 }
 
 listheader[sortable="true"]:hover:active {
-  border: 1px solid #FFCF00;
+  border: 1px solid #FF9F00;
   padding-top: 1px;
   padding-bottom: 0px;
   -moz-padding-start: 5px;
@@ -88,11 +86,11 @@ listheader[sortable="true"]:hover:active {
 }
 
 .listheader-icon {
-  margin-right: 2px;
+  -moz-margin-end: 2px;
 }
 
 .listheader-label {
-  margin: 0px !important;
+  margin: 0 4px !important;
 }
 
 /* ..... sort direction icon ..... */
@@ -144,11 +142,14 @@ listheader[sortable="true"]:hover:active {
   background-image: url("chrome://global/skin/checkbox/cbox-check.gif");
 }
 
-.listcell-check[disabled="true"] {
-  border-color: #8050B0;
-  background-image: url("chrome://global/skin/checkbox/cbox-disabled.gif");
+listitem[type="checkbox"]:hover .listcell-check[checked="true"] {
+  background-image: url("chrome://global/skin/checkbox/cbox-check-hover.gif");
 }
 
-.listcell-check[disabled="true"][checked="true"] {
-  background-image: url("chrome://global/skin/checkbox/cbox-check-disabled.gif");
+listitem[type="checkbox"]:hover .listcell-check {
+  border-color: #FFCF00;
+}
+
+listitem[type="checkbox"]:hover .listcell-label {
+  color: #FFCF00;
 }