Adwaita: take named colors out of _colors.scss

To be able to use sass for shipped css, importing _colors.scss
and _drawings.scss.
This commit is contained in:
Lapo Calamandrei 2014-08-28 13:21:14 +02:00
parent c0ed8e954e
commit f05e9d2612
7 changed files with 124 additions and 120 deletions

View File

@ -1429,6 +1429,7 @@ win32_theme_sources = \
adwaita_sources = \
resources/theme/Adwaita/assets.svg \
resources/theme/Adwaita/_colors.scss \
resources/theme/Adwaita/_colors-public.scss \
resources/theme/Adwaita/_common.scss \
resources/theme/Adwaita/_drawing.scss \
resources/theme/Adwaita/gtk-contained.scss \

View File

@ -0,0 +1,53 @@
//apps rely on some named colors to be exported
/* GTK NAMED COLORS */
// Sass thinks we're using the colors in the variables as strings and may shoot
// warning, it's innocuous and can be defeated by using "" + $var
@define-color theme_fg_color #{$fg_color};
@define-color theme_bg_color #{$bg_color};
@define-color theme_base_color #{"" + $base_color};
@define-color theme_selected_bg_color #{$selected_bg_color};
@define-color theme_selected_fg_color #{"" + $selected_fg_color};
@define-color insensitive_bg_color #{$insensitive_bg_color};
@define-color insensitive_fg_color #{$insensitive_fg_color};
@define-color insensitive_base_color #{"" + $base_color};
@define-color theme_unfocused_fg_color #{$backdrop_fg_color};
@define-color theme_unfocused_bg_color #{$backdrop_bg_color};
@define-color theme_unfocused_base_color #{$backdrop_base_color};
@define-color theme_unfocused_selected_bg_color #{$selected_bg_color};
@define-color theme_unfocused_selected_fg_color #{"" + $selected_fg_color};
@define-color borders #{$borders_color};
@define-color unfocused_borders #{$backdrop_borders_color};
@define-color warning_color #{$warning_color};
@define-color error_color #{$error_color};
@define-color success_color #{$success_color};
//@define-color desctructive_color #{$destructive_color}
//WM
$_wm_highlight: if($variant=='light', $top_hilight, // Sass gets mad if this is
transparentize(black,1)); // done directly in the
// color definition
@define-color wm_title shade(#{$fg_color}, 1.8);
@define-color wm_unfocused_title #{$backdrop_fg_color};
@define-color wm_highlight #{"" + $_wm_highlight};
@define-color wm_borders_edge #{"" + $borders_edge};
@define-color wm_bg_a shade(#{$bg_color}, 1.2);
@define-color wm_bg_b #{$bg_color};
@define-color wm_shadow alpha(black, 0.35);
@define-color wm_border alpha(black, 0.18);
@define-color wm_button_hover_color_a shade(#{$bg_color}, 1.3);
@define-color wm_button_hover_color_b #{$bg_color};
@define-color wm_button_active_color_a shade(#{$bg_color}, 0.85);
@define-color wm_button_active_color_b shade(#{$bg_color}, 0.89);
@define-color wm_button_active_color_c shade(#{$bg_color}, 0.9);
//FIXME this is really an API
@define-color content_view_bg #{"" + $base_color};

View File

@ -37,57 +37,3 @@ $backdrop_fg_color: mix($fg_color, $backdrop_bg_color, 80%);
$backdrop_insensitive_color: if($variant =='light', darken($backdrop_bg_color,15%), lighten($backdrop_bg_color,15%));
$backdrop_borders_color: mix($borders_color, $bg_color, 90%);
$backdrop_dark_fill: mix($backdrop_borders_color,$backdrop_bg_color, 35%);
//apps rely on some named colors to be exported
/* GTK NAMED COLORS */
// Sass thinks we're using the colors in the variables as strings and may shoot
// warning, it's innocuous and can be defeated by using "" + $var
@define-color theme_fg_color #{$fg_color};
@define-color theme_bg_color #{$bg_color};
@define-color theme_base_color #{"" + $base_color};
@define-color theme_selected_bg_color #{$selected_bg_color};
@define-color theme_selected_fg_color #{"" + $selected_fg_color};
@define-color insensitive_bg_color #{$insensitive_bg_color};
@define-color insensitive_fg_color #{$insensitive_fg_color};
@define-color insensitive_base_color #{"" + $base_color};
@define-color theme_unfocused_fg_color #{$backdrop_fg_color};
@define-color theme_unfocused_bg_color #{$backdrop_bg_color};
@define-color theme_unfocused_base_color #{$backdrop_base_color};
@define-color theme_unfocused_selected_bg_color #{$selected_bg_color};
@define-color theme_unfocused_selected_fg_color #{"" + $selected_fg_color};
@define-color borders #{$borders_color};
@define-color unfocused_borders #{$backdrop_borders_color};
@define-color warning_color #{$warning_color};
@define-color error_color #{$error_color};
@define-color success_color #{$success_color};
//@define-color desctructive_color #{$destructive_color}
//WM
$_wm_highlight: if($variant=='light', $top_hilight, // Sass gets mad if this is
transparentize(black,1)); // done directly in the
// color definition
@define-color wm_title shade(#{$fg_color}, 1.8);
@define-color wm_unfocused_title #{$backdrop_fg_color};
@define-color wm_highlight #{"" + $_wm_highlight};
@define-color wm_borders_edge #{"" + $borders_edge};
@define-color wm_bg_a shade(#{$bg_color}, 1.2);
@define-color wm_bg_b #{$bg_color};
@define-color wm_shadow alpha(black, 0.35);
@define-color wm_border alpha(black, 0.18);
@define-color wm_button_hover_color_a shade(#{$bg_color}, 1.3);
@define-color wm_button_hover_color_b #{$bg_color};
@define-color wm_button_active_color_a shade(#{$bg_color}, 0.85);
@define-color wm_button_active_color_b shade(#{$bg_color}, 0.89);
@define-color wm_button_active_color_c shade(#{$bg_color}, 0.9);
//FIXME this is really an API
@define-color content_view_bg #{"" + $base_color};

View File

@ -1,36 +1,3 @@
/* GTK NAMED COLORS */
@define-color theme_fg_color #eeeeec;
@define-color theme_bg_color #393f3f;
@define-color theme_base_color #292929;
@define-color theme_selected_bg_color #215d9c;
@define-color theme_selected_fg_color #ffffff;
@define-color insensitive_bg_color #323636;
@define-color insensitive_fg_color #939695;
@define-color insensitive_base_color #292929;
@define-color theme_unfocused_fg_color #c9cbc9;
@define-color theme_unfocused_bg_color #393f3f;
@define-color theme_unfocused_base_color #2c2c2c;
@define-color theme_unfocused_selected_bg_color #215d9c;
@define-color theme_unfocused_selected_fg_color #ffffff;
@define-color borders #1c1f1f;
@define-color unfocused_borders #1e2222;
@define-color warning_color #f57900;
@define-color error_color #cc0000;
@define-color success_color #5aa411;
@define-color wm_title shade(#eeeeec, 1.8);
@define-color wm_unfocused_title #c9cbc9;
@define-color wm_highlight transparent;
@define-color wm_borders_edge rgba(238, 238, 236, 0.1);
@define-color wm_bg_a shade(#393f3f, 1.2);
@define-color wm_bg_b #393f3f;
@define-color wm_shadow alpha(black, 0.35);
@define-color wm_border alpha(black, 0.18);
@define-color wm_button_hover_color_a shade(#393f3f, 1.3);
@define-color wm_button_hover_color_b #393f3f;
@define-color wm_button_active_color_a shade(#393f3f, 0.85);
@define-color wm_button_active_color_b shade(#393f3f, 0.89);
@define-color wm_button_active_color_c shade(#393f3f, 0.9);
@define-color content_view_bg #292929;
* {
padding: 0;
-GtkToolButton-icon-spacing: 4;
@ -3420,4 +3387,38 @@ GtkCalendar.header .button.titlebutton {
border-color: transparent;
transition-property: border, box-shadow, color; }
/* GTK NAMED COLORS */
@define-color theme_fg_color #eeeeec;
@define-color theme_bg_color #393f3f;
@define-color theme_base_color #292929;
@define-color theme_selected_bg_color #215d9c;
@define-color theme_selected_fg_color #ffffff;
@define-color insensitive_bg_color #323636;
@define-color insensitive_fg_color #939695;
@define-color insensitive_base_color #292929;
@define-color theme_unfocused_fg_color #c9cbc9;
@define-color theme_unfocused_bg_color #393f3f;
@define-color theme_unfocused_base_color #2c2c2c;
@define-color theme_unfocused_selected_bg_color #215d9c;
@define-color theme_unfocused_selected_fg_color #ffffff;
@define-color borders #1c1f1f;
@define-color unfocused_borders #1e2222;
@define-color warning_color #f57900;
@define-color error_color #cc0000;
@define-color success_color #5aa411;
@define-color wm_title shade(#eeeeec, 1.8);
@define-color wm_unfocused_title #c9cbc9;
@define-color wm_highlight transparent;
@define-color wm_borders_edge rgba(238, 238, 236, 0.1);
@define-color wm_bg_a shade(#393f3f, 1.2);
@define-color wm_bg_b #393f3f;
@define-color wm_shadow alpha(black, 0.35);
@define-color wm_border alpha(black, 0.18);
@define-color wm_button_hover_color_a shade(#393f3f, 1.3);
@define-color wm_button_hover_color_b #393f3f;
@define-color wm_button_active_color_a shade(#393f3f, 0.85);
@define-color wm_button_active_color_b shade(#393f3f, 0.89);
@define-color wm_button_active_color_c shade(#393f3f, 0.9);
@define-color content_view_bg #292929;
/*# sourceMappingURL=gtk-contained-dark.css.map */

View File

@ -3,3 +3,4 @@ $variant: 'dark';
@import 'colors';
@import 'drawing';
@import 'common';
@import 'colors-public';

View File

@ -1,36 +1,3 @@
/* GTK NAMED COLORS */
@define-color theme_fg_color #2e3436;
@define-color theme_bg_color #ededed;
@define-color theme_base_color #ffffff;
@define-color theme_selected_bg_color #4a90d9;
@define-color theme_selected_fg_color #ffffff;
@define-color insensitive_bg_color #f4f4f4;
@define-color insensitive_fg_color #8d9091;
@define-color insensitive_base_color #ffffff;
@define-color theme_unfocused_fg_color #54595a;
@define-color theme_unfocused_bg_color #ededed;
@define-color theme_unfocused_base_color #fcfcfc;
@define-color theme_unfocused_selected_bg_color #4a90d9;
@define-color theme_unfocused_selected_fg_color #ffffff;
@define-color borders #a1a1a1;
@define-color unfocused_borders #a8a8a8;
@define-color warning_color #f57900;
@define-color error_color #cc0000;
@define-color success_color #73d216;
@define-color wm_title shade(#2e3436, 1.8);
@define-color wm_unfocused_title #54595a;
@define-color wm_highlight white;
@define-color wm_borders_edge white;
@define-color wm_bg_a shade(#ededed, 1.2);
@define-color wm_bg_b #ededed;
@define-color wm_shadow alpha(black, 0.35);
@define-color wm_border alpha(black, 0.18);
@define-color wm_button_hover_color_a shade(#ededed, 1.3);
@define-color wm_button_hover_color_b #ededed;
@define-color wm_button_active_color_a shade(#ededed, 0.85);
@define-color wm_button_active_color_b shade(#ededed, 0.89);
@define-color wm_button_active_color_c shade(#ededed, 0.9);
@define-color content_view_bg #ffffff;
* {
padding: 0;
-GtkToolButton-icon-spacing: 4;
@ -3416,4 +3383,38 @@ GtkCalendar.header .button.titlebutton {
border-color: transparent;
transition-property: border, box-shadow, color; }
/* GTK NAMED COLORS */
@define-color theme_fg_color #2e3436;
@define-color theme_bg_color #ededed;
@define-color theme_base_color #ffffff;
@define-color theme_selected_bg_color #4a90d9;
@define-color theme_selected_fg_color #ffffff;
@define-color insensitive_bg_color #f4f4f4;
@define-color insensitive_fg_color #8d9091;
@define-color insensitive_base_color #ffffff;
@define-color theme_unfocused_fg_color #54595a;
@define-color theme_unfocused_bg_color #ededed;
@define-color theme_unfocused_base_color #fcfcfc;
@define-color theme_unfocused_selected_bg_color #4a90d9;
@define-color theme_unfocused_selected_fg_color #ffffff;
@define-color borders #a1a1a1;
@define-color unfocused_borders #a8a8a8;
@define-color warning_color #f57900;
@define-color error_color #cc0000;
@define-color success_color #73d216;
@define-color wm_title shade(#2e3436, 1.8);
@define-color wm_unfocused_title #54595a;
@define-color wm_highlight white;
@define-color wm_borders_edge white;
@define-color wm_bg_a shade(#ededed, 1.2);
@define-color wm_bg_b #ededed;
@define-color wm_shadow alpha(black, 0.35);
@define-color wm_border alpha(black, 0.18);
@define-color wm_button_hover_color_a shade(#ededed, 1.3);
@define-color wm_button_hover_color_b #ededed;
@define-color wm_button_active_color_a shade(#ededed, 0.85);
@define-color wm_button_active_color_b shade(#ededed, 0.89);
@define-color wm_button_active_color_c shade(#ededed, 0.9);
@define-color content_view_bg #ffffff;
/*# sourceMappingURL=gtk-contained.css.map */

View File

@ -9,3 +9,4 @@ $variant: 'light';
@import 'colors';
@import 'drawing';
@import 'common';
@import 'colors-public';