Bug 508940 - Use build time preprocessing in order to share colors and other common CSS declarations in the theme. r=dao

This commit is contained in:
Markus Stange 2009-08-31 12:26:43 +12:00
parent a2030dada0
commit 401ca9822f
9 changed files with 127 additions and 89 deletions

View File

@ -61,7 +61,7 @@ browser.jar:
skin/classic/browser/monitor.png
skin/classic/browser/monitor_16-10.png
skin/classic/browser/places/allBookmarks.png (places/allBookmarks.png)
skin/classic/browser/places/places.css (places/places.css)
* skin/classic/browser/places/places.css (places/places.css)
* skin/classic/browser/places/organizer.css (places/organizer.css)
skin/classic/browser/places/query.png (places/query.png)
skin/classic/browser/places/livemarkItem.png (places/livemarkItem.png)

View File

@ -1,3 +1,5 @@
%include ../shared.inc
/* Inactive Window */
#places:not([active="true"]) > #placesToolbox > #placesToolbar > toolbarbutton,
@ -24,13 +26,28 @@
}
#placesList treechildren::-moz-tree-row(selected) {
background: -moz-linear-gradient(top, bottom, from(#B5B5B5), to(#8A8A8A)) repeat-x;
border-top: 1px solid #979797;
background: @sidebarItemBackground@;
border-top: @sidebarItemBorderTop@;
}
#placesList treechildren::-moz-tree-row(selected,focus) {
background: -moz-linear-gradient(top, bottom, from(#A2B1D0), to(#6E81A9)) repeat-x;
border-top: 1px solid #91a0c0;
background: @sidebarItemFocusedBackground@;
border-top: @sidebarItemFocusedBorderTop@;
}
#placesList:-moz-system-metric(mac-graphite-theme) treechildren::-moz-tree-row(selected) {
background: @sidebarItemGraphiteBackground@;
border-top: @sidebarItemGraphiteBorderTop@;
}
#placesList:-moz-system-metric(mac-graphite-theme) treechildren::-moz-tree-row(selected,focus) {
background: @sidebarItemGraphiteFocusedBackground@;
border-top: @sidebarItemGraphiteFocusedBorderTop@;
}
window:not([active="true"]) #placesList treechildren::-moz-tree-row(selected) {
background: @sidebarItemInactiveBackground@;
border-top: @sidebarItemInactiveBorderTop@;
}
#placesList treechildren::-moz-tree-row(History),
@ -332,15 +349,15 @@
#organizerScopeBar {
padding: 3px;
-moz-appearance: none;
background: -moz-linear-gradient(top, bottom, from(#E8E8E8), to(#D0D0D0)) repeat-x;
border-bottom: 1px solid #B1B1B1;
background: @scopeBarBackground@;
border-bottom: @scopeBarSeparatorBorder@;
}
#scopeBarTitle {
font: icon;
color: #6D6D6D;
color: @scopeBarTitleColor@;
font-weight: bold;
text-shadow: 0 1px rgba(255, 255, 255, .4);
text-shadow: @loweredShadow@;
margin: 0 6px 1px;
}
@ -402,36 +419,28 @@
margin: 0 4px;
padding: 0 10px;
-moz-appearance: none;
border: 1px solid rgba(0, 0, 0, .4);
-moz-border-radius: 100%;
text-shadow: 0 1px rgba(255, 255, 255, .4);
background: -moz-linear-gradient(top, bottom, from(#FFF), to(#CACACA)) repeat-x;
-moz-box-shadow: 0 1px 0 rgba(255, 255, 255, .4);
border: @roundButtonBorder@;
text-shadow: @loweredShadow@;
background: @roundButtonBackground@;
-moz-box-shadow: @roundButtonShadow@;
}
#saveSearch > .button-box > .button-text {
margin: 0 !important;
}
#saveSearch:focus {
-moz-box-shadow: 0 0 1px -moz-mac-focusring inset,
0 0 4px 1px -moz-mac-focusring,
0 0 2px 1px -moz-mac-focusring,
0 1px rgba(255, 255, 255, .4);
#saveSearch:active:hover {
background: @roundButtonPressedBackground@;
-moz-box-shadow: @roundButtonPressedShadow@;
}
#saveSearch:active:hover {
background: #CCC;
-moz-box-shadow: inset 0 1px 4px rgba(0, 0, 0, .2),
0 1px rgba(255, 255, 255, .4);
#saveSearch:focus {
-moz-box-shadow: @focusRingShadow@, @roundButtonShadow@;
}
#saveSearch:active:hover:focus {
-moz-box-shadow: 0 0 1px -moz-mac-focusring inset,
0 0 4px 1px -moz-mac-focusring,
0 0 2px 1px -moz-mac-focusring,
inset 0 1px 4px rgba(0, 0, 0, .2),
0 1px rgba(255, 255, 255, .4);
-moz-box-shadow: @focusRingShadow@, @roundButtonPressedShadow@;
}
%ifdef PLACES_QUERY_BUILDER

View File

@ -1,3 +1,5 @@
%include ../shared.inc
/* Sidebars */
.sidebar-placesTree {
@ -30,12 +32,6 @@ tree.sidebar-placesTree treechildren::-moz-tree-row {
border: none;
}
#bookmarks-view treechildren::-moz-tree-row(selected),
#historyTree treechildren::-moz-tree-row(selected) {
background: -moz-linear-gradient(top, bottom, from(#B5B5B5), to(#8A8A8A)) repeat-x;
border-top: 1px solid #979797;
}
tree.sidebar-placesTree treechildren::-moz-tree-separator {
border-top: 1px solid #505d6d;
margin: 0 10px;
@ -46,10 +42,28 @@ tree.sidebar-placesTree treechildren::-moz-tree-separator {
border-top: 1px solid #bebebe;
}
#bookmarks-view treechildren::-moz-tree-row(selected),
#historyTree treechildren::-moz-tree-row(selected) {
background: @sidebarItemBackground@;
border-top: @sidebarItemBorderTop@;
}
#bookmarks-view treechildren::-moz-tree-row(selected,focus),
#historyTree treechildren::-moz-tree-row(selected,focus) {
background: -moz-linear-gradient(top, bottom, from(#A2B1D0), to(#6E81A9)) repeat-x;
border-top: 1px solid #91a0c0;
background: @sidebarItemFocusedBackground@;
border-top: @sidebarItemFocusedBorderTop@;
}
#bookmarks-view:-moz-system-metric(mac-graphite-theme) treechildren::-moz-tree-row(selected),
#historyTree:-moz-system-metric(mac-graphite-theme) treechildren::-moz-tree-row(selected) {
background: @sidebarItemGraphiteBackground@;
border-top: @sidebarItemGraphiteBorderTop@;
}
#bookmarks-view:-moz-system-metric(mac-graphite-theme) treechildren::-moz-tree-row(selected,focus),
#historyTree:-moz-system-metric(mac-graphite-theme) treechildren::-moz-tree-row(selected,focus) {
background: @sidebarItemGraphiteFocusedBackground@;
border-top: @sidebarItemGraphiteFocusedBorderTop@;
}
tree.sidebar-placesTree treechildren::-moz-tree-cell-text(selected) {

View File

@ -0,0 +1 @@
%include ../../../../toolkit/themes/pinstripe/global/shared.inc

View File

@ -42,6 +42,7 @@
/* View buttons */
@import "chrome://global/skin/viewbuttons.css";
%include ../shared.inc
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
.console-box {
@ -150,14 +151,14 @@
#ToolbarEval {
-moz-appearance: none;
background: -moz-linear-gradient(top, bottom, from(#E8E8E8), to(#D0D0D0)) repeat-x;
border-bottom: 1px solid #686868;
background: @scopeBarBackground@;
border-bottom: @scopeBarSeparatorBorder@;
padding: 2px;
}
#ToolbarEval > label {
font-weight: bold;
color: #5F5F5F;
color: @scopeBarTitleColor@;
}
#TextfieldEval {
@ -166,12 +167,12 @@
#ButtonEval {
margin: 0 4px;
-moz-appearance: none;
border: 1px solid rgba(0, 0, 0, .4);
-moz-border-radius: 100%;
background: -moz-linear-gradient(top, bottom, from(#FFF), to(#CACACA)) repeat-x;
padding: 1px 10px;
-moz-box-shadow: 0 1px 0 rgba(255, 255, 255, .4);
-moz-appearance: none;
-moz-border-radius: 100%;
border: @roundButtonBorder@;
background: @roundButtonBackground@;
-moz-box-shadow: @roundButtonShadow@;
}
#ButtonEval > .toolbarbutton-text {
@ -179,10 +180,9 @@
}
#ButtonEval:hover:active {
text-shadow: 0 1px rgba(255, 255, 255, .4);
background: #CCC;
-moz-box-shadow: inset 0 1px 4px rgba(0, 0, 0, .2),
0 1px rgba(255, 255, 255, .4);
text-shadow: @loweredShadow@;
background: @roundButtonPressedBackground@;
-moz-box-shadow: @roundButtonPressedShadow@;
}
toolbarseparator {

View File

@ -1,19 +1,20 @@
%include shared.inc
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
/* ::::: find toolbar ::::: */
findbar {
background: -moz-linear-gradient(top, bottom, from(#E8E8E8), to(#D0D0D0)) repeat-x;
border-top: 1px solid #888;
background: @scopeBarBackground@;
border-top: @scopeBarSeparatorBorder@;
min-width: 1px;
padding: 4px 1px;
}
.findbar-container > label {
margin: 1px 3px 0 !important;
color: #6D6D6D;
color: @scopeBarTitleColor@;
font-weight: bold;
text-shadow: 0 1px rgba(255, 255, 255, .4);
text-shadow: @loweredShadow@;
}
.findbar-closebutton {
@ -34,20 +35,18 @@ findbar {
.findbar-find-next,
.findbar-find-previous,
.findbar-highlight {
-moz-appearance: none;
border: 1px solid rgba(0, 0, 0, .4);
-moz-border-radius: 100%;
background: -moz-linear-gradient(top, bottom, from(#FFF), to(#CACACA)) repeat-x;
margin: 0 4px;
padding: 1px 3px;
-moz-box-shadow: 0 1px 0 rgba(255, 255, 255, .4);
-moz-appearance: none;
-moz-border-radius: 100%;
border: @roundButtonBorder@;
background: @roundButtonBackground@;
-moz-box-shadow: @roundButtonShadow@;
}
.findbar-container > toolbarbutton:focus {
position: relative;
-moz-box-shadow: 0 0 1px -moz-mac-focusring inset,
0 0 4px 1px -moz-mac-focusring,
0 0 2px 1px -moz-mac-focusring;
-moz-box-shadow: @focusRingShadow@, @roundButtonShadow@;
}
.findbar-container > toolbarbutton > .toolbarbutton-text {
@ -61,20 +60,15 @@ findbar {
.findbar-find-next:not([disabled]):hover:active,
.findbar-find-previous:not([disabled]):hover:active,
.findbar-highlight:not([disabled]):hover:active {
text-shadow: 0 1px rgba(255, 255, 255, .4);
background: #CCC;
-moz-box-shadow: inset 0 1px 4px rgba(0, 0, 0, .2),
0 1px rgba(255, 255, 255, .4);
text-shadow: @loweredShadow@;
background: @roundButtonPressedBackground@;
-moz-box-shadow: @roundButtonPressedShadow@;
}
.findbar-container > toolbarbutton:hover:active:focus {
text-shadow: 0 1px rgba(255, 255, 255, .4);
background: #CCC;
-moz-box-shadow: 0 0 1px -moz-mac-focusring inset,
0 0 4px 1px -moz-mac-focusring,
0 0 2px 1px -moz-mac-focusring,
inset 0 1px 4px rgba(0, 0, 0, .2),
0 1px rgba(255, 255, 255, .4);
text-shadow: @loweredShadow@;
background: @roundButtonPressedBackground@;
-moz-box-shadow: @focusRingShadow@, @roundButtonPressedShadow@;
}
.findbar-closebutton > .toolbarbutton-text {
@ -119,8 +113,7 @@ findbar {
.findbar-container > checkbox:focus > .checkbox-label-box > .checkbox-icon {
-moz-border-radius: 4px;
-moz-box-shadow: 0 0 0 2px -moz-mac-focusring inset,
0 0 4px -moz-mac-focusring;
-moz-box-shadow: @focusRingShadow@;
}
/* Search field */
@ -138,9 +131,7 @@ findbar {
}
.findbar-textbox[focused="true"] {
-moz-box-shadow: 0 0 1px -moz-mac-focusring inset,
0 0 4px 1px -moz-mac-focusring,
0 0 2px 1px -moz-mac-focusring,
-moz-box-shadow: @focusRingShadow@,
0 1px 2px rgba(0, 0, 0, .8) inset;
}

View File

@ -43,6 +43,7 @@
/* all localizable skin settings shall live here */
@import url("chrome://global/locale/intl.css");
%include shared.inc
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
/* ::::: XBL bindings ::::: */
@ -277,27 +278,24 @@ notification > button {
min-width: 60px;
min-height: 16px;
-moz-appearance: none;
border: 1px solid rgba(0, 0, 0, .4);
-moz-border-radius: 100%;
background: -moz-linear-gradient(top, bottom, from(#FFF), to(#CACACA)) repeat-x;
text-shadow: 0 1px rgba(255, 255, 255, .4);
-moz-box-shadow: 0 1px 0 rgba(255, 255, 255, .4);
border: @roundButtonBorder@;
text-shadow: @loweredShadow@;
background: @roundButtonBackground@;
-moz-box-shadow: @roundButtonShadow@;
}
notification > button:active:hover {
background: #CCC;
-moz-box-shadow: inset 0 1px 4px rgba(0, 0, 0, .2),
0 1px rgba(255, 255, 255, .4);
background: @roundButtonPressedBackground@;
-moz-box-shadow: @roundButtonPressedShadow@;
}
notification > button:focus {
-moz-box-shadow: 0 0 3px 2px -moz-mac-focusring;
-moz-box-shadow: @focusRingShadow@, @roundButtonShadow@;
}
notification > button:active:hover:focus {
-moz-box-shadow: 0 0 3px 2px -moz-mac-focusring,
inset 0 1px 4px rgba(0, 0, 0, .2),
0 1px rgba(255, 255, 255, .4);
-moz-box-shadow: @focusRingShadow@, @roundButtonPressedShadow@;
}
notification > button > .button-box > .button-text {

View File

@ -16,8 +16,8 @@ toolkit.jar:
+ skin/classic/global/dropmarker.css
+ skin/classic/global/filefield.css
+ skin/classic/global/filepicker.css
+ skin/classic/global/findBar.css
+ skin/classic/global/global.css
* skin/classic/global/findBar.css
* skin/classic/global/global.css
+ skin/classic/global/groupbox.css
+ skin/classic/global/linkTree.css
+ skin/classic/global/listbox.css
@ -71,7 +71,7 @@ toolkit.jar:
+ skin/classic/global/checkbox/cbox-check-dis.gif (checkbox/cbox-check-dis.gif)
+ skin/classic/global/console/console-error-caret.gif (console/console-error-caret.gif)
+ skin/classic/global/console/console-error-dash.gif (console/console-error-dash.gif)
+ skin/classic/global/console/console.css (console/console.css)
* skin/classic/global/console/console.css (console/console.css)
+ skin/classic/global/dirListing/dirListing.css (dirListing/dirListing.css)
+ skin/classic/global/dirListing/folder.png (dirListing/folder.png)
+ skin/classic/global/dirListing/local.png (dirListing/local.png)

View File

@ -0,0 +1,25 @@
%filter substitution
%define loweredShadow 0 1px rgba(255, 255, 255, .4)
%define focusRingShadow 0 0 1px -moz-mac-focusring inset, 0 0 4px 1px -moz-mac-focusring, 0 0 2px 1px -moz-mac-focusring
%define roundButtonBorder 1px solid rgba(0, 0, 0, .4)
%define roundButtonBackground -moz-linear-gradient(top, bottom, from(#FFF), to(#CACACA)) repeat-x
%define roundButtonShadow 0 1px rgba(255, 255, 255, .4)
%define roundButtonPressedBackground #CCC
%define roundButtonPressedShadow inset 0 1px 4px rgba(0, 0, 0, .2), 0 1px rgba(255, 255, 255, .4)
%define scopeBarBackground -moz-linear-gradient(top, bottom, from(#E8E8E8), to(#D0D0D0)) repeat-x
%define scopeBarSeparatorBorder 1px solid #888
%define scopeBarTitleColor #6D6D6D
%define sidebarItemBorderTop 1px solid #94A1C0
%define sidebarItemBackground -moz-linear-gradient(top, bottom, from(#A0B0CF), to(#7386AB)) repeat-x
%define sidebarItemFocusedBorderTop 1px solid #5382C5
%define sidebarItemFocusedBackground -moz-linear-gradient(top, bottom, from(#6494D4), to(#2559AC)) repeat-x
%define sidebarItemGraphiteBorderTop 1px solid #97A4B1
%define sidebarItemGraphiteBackground -moz-linear-gradient(top, bottom, from(#AAB7C4), to(#8393A4)) repeat-x
%define sidebarItemGraphiteFocusedBorderTop 1px solid #6B798D
%define sidebarItemGraphiteFocusedBackground -moz-linear-gradient(top, bottom, from(#8293A6), to(#425972)) repeat-x
%define sidebarItemInactiveBorderTop 1px solid #979797
%define sidebarItemInactiveBackground -moz-linear-gradient(top, bottom, from(#B4B4B4), to(#8A8A8A)) repeat-x