Add source files
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
SCSS=scss --no-cache --quiet --sourcemap=none
|
||||
THEMES_DIR=../../../../share/themes/
|
||||
|
||||
.PHONY: install clean
|
||||
|
||||
build:
|
||||
for scss in gtk*.scss ; \
|
||||
do \
|
||||
echo ; \
|
||||
echo Generating $${scss%.scss}.css ; \
|
||||
$(SCSS) $$scss > $${scss%.scss}.css ; \
|
||||
done
|
||||
cp gtk.css $(THEMES_DIR)/Kali-Light/gtk-3.0/gtk.css
|
||||
cp gtk-dark.css $(THEMES_DIR)/Kali-Light/gtk-3.0/gtk-dark.css
|
||||
cp gtk-dark.css $(THEMES_DIR)/Kali-Dark/gtk-3.0/gtk.css
|
||||
|
||||
clean:
|
||||
-rm *.css
|
||||
@@ -0,0 +1,49 @@
|
||||
/* XFCE4 PANEL */
|
||||
.xfce4-panel {
|
||||
&.background {
|
||||
background: transparentize($bg_color, if($variant=='light', .1, .2));
|
||||
}
|
||||
|
||||
button {
|
||||
border: 0;
|
||||
border-radius: 0;
|
||||
box-shadow: none;
|
||||
text-shadow: none;
|
||||
background: transparent;
|
||||
color: if($variant=='light', darken($fg_color, 10%), $fg_color);
|
||||
|
||||
$_highlight_bg_color: if($variant=='light', $bg_color, rgba(black, .2));
|
||||
|
||||
&:hover {
|
||||
background: $_highlight_bg_color;
|
||||
}
|
||||
|
||||
&:not(#whiskermenu-button) {
|
||||
&:checked, &:active {
|
||||
box-shadow: inset 0 4px 0 $selected_bg_color;
|
||||
background: $_highlight_bg_color;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* XFCE4 panel action buttons */
|
||||
#XfcePanelWindowWrapper > widget > box > #xfce-panel-button > image {
|
||||
-gtk-icon-style: symbolic;
|
||||
-gtk-icon-transform: scale(.7);
|
||||
}
|
||||
|
||||
/* XFCE4 workspace switcher */
|
||||
wnck-pager {
|
||||
background-color: lighten($base_color, 10%);
|
||||
&:selected { background-color: darken($bg_color, 20%); }
|
||||
&:hover { background-color: darken($bg_color, 20%); }
|
||||
}
|
||||
|
||||
/* Thunar */
|
||||
// Hide root user warning
|
||||
.thunar .warning {
|
||||
opacity: 0;
|
||||
font-size: 0;
|
||||
margin: -10px 0;
|
||||
}
|
||||
@@ -0,0 +1,116 @@
|
||||
//apps rely on some named colors to be exported
|
||||
/* GTK NAMED COLORS
|
||||
----------------
|
||||
use responsibly! */
|
||||
|
||||
// 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
|
||||
/*
|
||||
widget text/foreground color */
|
||||
@define-color theme_fg_color #{"" +$fg_color};
|
||||
|
||||
/*
|
||||
text color for entries, views and content in general */
|
||||
@define-color theme_text_color #{"" +$text_color};
|
||||
|
||||
/*
|
||||
widget base background color */
|
||||
@define-color theme_bg_color #{"" +$bg_color};
|
||||
|
||||
/*
|
||||
text widgets and the like base background color */
|
||||
@define-color theme_base_color #{"" +$base_color};
|
||||
|
||||
/*
|
||||
base background color of selections */
|
||||
@define-color theme_selected_bg_color #{"" +$selected_bg_color};
|
||||
|
||||
/*
|
||||
text/foreground color of selections */
|
||||
@define-color theme_selected_fg_color #{"" +$selected_fg_color};
|
||||
|
||||
/*
|
||||
base background color of insensitive widgets */
|
||||
@define-color insensitive_bg_color #{"" +$insensitive_bg_color};
|
||||
|
||||
/*
|
||||
text foreground color of insensitive widgets */
|
||||
@define-color insensitive_fg_color #{"" +$insensitive_fg_color};
|
||||
|
||||
/*
|
||||
insensitive text widgets and the like base background color */
|
||||
@define-color insensitive_base_color #{"" +$base_color};
|
||||
|
||||
/*
|
||||
widget text/foreground color on backdrop windows */
|
||||
@define-color theme_unfocused_fg_color #{"" +$backdrop_fg_color};
|
||||
|
||||
/*
|
||||
text color for entries, views and content in general on backdrop windows */
|
||||
@define-color theme_unfocused_text_color #{"" +$text_color};
|
||||
|
||||
/*
|
||||
widget base background color on backdrop windows */
|
||||
@define-color theme_unfocused_bg_color #{"" +$backdrop_bg_color};
|
||||
|
||||
/*
|
||||
text widgets and the like base background color on backdrop windows */
|
||||
@define-color theme_unfocused_base_color #{"" +$backdrop_base_color};
|
||||
|
||||
/*
|
||||
base background color of selections on backdrop windows */
|
||||
@define-color theme_unfocused_selected_bg_color #{"" +$selected_bg_color};
|
||||
|
||||
/*
|
||||
text/foreground color of selections on backdrop windows */
|
||||
@define-color theme_unfocused_selected_fg_color #{"" + $selected_fg_color};
|
||||
|
||||
/*
|
||||
insensitive color on backdrop windows*/
|
||||
@define-color unfocused_insensitive_color #{"" + $backdrop_insensitive_color};
|
||||
|
||||
/*
|
||||
widgets main borders color */
|
||||
@define-color borders #{"" +$borders_color};
|
||||
|
||||
/*
|
||||
widgets main borders color on backdrop windows */
|
||||
@define-color unfocused_borders #{"" +$backdrop_borders_color};
|
||||
|
||||
/*
|
||||
these are pretty self explicative */
|
||||
@define-color warning_color #{"" +$warning_color};
|
||||
@define-color error_color #{"" +$error_color};
|
||||
@define-color success_color #{"" +$success_color};
|
||||
//@define-color destructive_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
|
||||
|
||||
/*
|
||||
these colors are exported for the window manager and shouldn't be used in applications,
|
||||
read if you used those and something break with a version upgrade you're on your own... */
|
||||
@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};
|
||||
|
||||
@@ -0,0 +1,77 @@
|
||||
// When color definition differs for dark and light variant
|
||||
// it gets @if ed depending on $variant
|
||||
|
||||
|
||||
$base_color: if($variant == 'light', darken(#ffffff, 2%), #272a34);
|
||||
$text_color: if($variant == 'light', black, white);
|
||||
$bg_color: if($variant == 'light', #ffffff, darken(#272a34, 2%));
|
||||
$fg_color: if($variant == 'light', #5c616c, #eeeeec);
|
||||
|
||||
$selected_fg_color: #ffffff;
|
||||
$selected_bg_color: saturate(#367bf0, 20%);
|
||||
$selected_borders_color: if($variant== 'light', darken($selected_bg_color, 15%), darken($selected_bg_color, 30%));
|
||||
$borders_color: if($variant == 'light', darken($bg_color, 18%), darken($bg_color, 10%));
|
||||
$alt_borders_color: if($variant == 'light', darken($bg_color, 24%), darken($bg_color, 18%));
|
||||
$borders_edge: if($variant == 'light', transparentize(white, 0.2), transparentize($fg_color, 0.93));
|
||||
$link_color: if($variant == 'light', darken($selected_bg_color, 10%), lighten($selected_bg_color, 20%));
|
||||
$link_visited_color: if($variant == 'light', darken($selected_bg_color, 20%), lighten($selected_bg_color, 10%));
|
||||
$top_hilight: $borders_edge;
|
||||
$dark_fill: mix($borders_color, $bg_color, 50%);
|
||||
$headerbar_color: if($variant == 'light', lighten($bg_color, 5%), darken($bg_color, 3%));
|
||||
$menu_color: if($variant == 'light', $base_color, mix($bg_color, $base_color, 20%));
|
||||
$popover_bg_color: $bg_color;
|
||||
$popover_hover_color: lighten($bg_color, 5%);
|
||||
|
||||
$scrollbar_bg_color: if($variant == 'light', mix($bg_color, $fg_color, 80%), mix($base_color, $bg_color, 50%));
|
||||
$scrollbar_slider_color: mix($fg_color, $bg_color, 60%);
|
||||
$scrollbar_slider_hover_color: mix($fg_color, $bg_color, 80%);
|
||||
$scrollbar_slider_active_color: if($variant=='light', darken($selected_bg_color, 10%), lighten($selected_bg_color, 10%));
|
||||
|
||||
$warning_color: #fd7d00;
|
||||
$error_color: #bf1717;
|
||||
$success_color: if($variant == 'light', #3db47e, darken(#3db47e, 10%));
|
||||
$destructive_color: if($variant == 'light', #d41919, darken(#d41919, 10%));
|
||||
|
||||
$osd_fg_color: #eeeeec;
|
||||
$osd_text_color: white;
|
||||
$osd_bg_color: if($variant == 'light', #272a34, darken(#272a34, 10%));
|
||||
$osd_insensitive_bg_color: transparentize(mix($osd_fg_color, opacify($osd_bg_color, 1), 10%), 0.5);
|
||||
$osd_insensitive_fg_color: mix($osd_fg_color, opacify($osd_bg_color, 1), 50%);
|
||||
$osd_borders_color: if($variant == 'light', darken($osd_bg_color, 20%), lighten($osd_bg_color, 20%));
|
||||
|
||||
$sidebar_bg_color: mix($bg_color, $base_color, 50%);
|
||||
$base_hover_color: transparentize($fg_color, 0.95);
|
||||
|
||||
$tooltip_borders_color: transparentize(white, 0.9);
|
||||
$shadow_color: transparentize(black, 0.9);
|
||||
|
||||
$drop_target_color: #0a814b;
|
||||
|
||||
//insensitive state derived colors
|
||||
$insensitive_fg_color: mix($fg_color, $bg_color, 50%);
|
||||
$insensitive_bg_color: mix($bg_color, $base_color, 60%);
|
||||
$insensitive_borders_color: $borders_color;
|
||||
|
||||
//colors for the backdrop state, derived from the main colors.
|
||||
$backdrop_base_color: if($variant == 'light', darken($base_color, 1%), lighten($base_color, 1%));
|
||||
$backdrop_text_color: mix($text_color, $backdrop_base_color, 80%);
|
||||
$backdrop_bg_color: $bg_color;
|
||||
$backdrop_fg_color: mix($fg_color, $backdrop_bg_color, 50%);
|
||||
$backdrop_insensitive_color: if($variant == 'light', darken($backdrop_bg_color, 15%), lighten($backdrop_bg_color, 15%));
|
||||
$backdrop_selected_fg_color: if($variant == 'light', $backdrop_base_color, $backdrop_text_color);
|
||||
$backdrop_borders_color: mix($borders_color, $bg_color, 80%);
|
||||
$backdrop_dark_fill: mix($backdrop_borders_color, $backdrop_bg_color, 35%);
|
||||
$backdrop_sidebar_bg_color: mix($backdrop_bg_color, $backdrop_base_color, 50%);
|
||||
|
||||
$backdrop_scrollbar_bg_color: darken($backdrop_bg_color, 3%);
|
||||
$backdrop_scrollbar_slider_color: mix($backdrop_fg_color, $backdrop_bg_color, 40%);
|
||||
|
||||
$backdrop_menu_color: if($variant == 'light', $backdrop_base_color, mix($backdrop_bg_color, $backdrop_base_color, 20%));
|
||||
|
||||
//special cased widget colors
|
||||
$suggested_bg_color: $selected_bg_color;
|
||||
$suggested_border_color: $selected_borders_color;
|
||||
$progress_bg_color: $selected_bg_color;
|
||||
$progress_border_color: $selected_borders_color;
|
||||
$checkradio_bg_color: $selected_bg_color;
|
||||
$checkradio_fg_color: $selected_fg_color;
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,604 @@
|
||||
// Drawing mixins
|
||||
|
||||
// generic drawing of more complex things
|
||||
|
||||
@function _widget_edge($c:$borders_edge) {
|
||||
// outer highlight "used" on most widgets
|
||||
@if $c == none { @return none; }
|
||||
@else { @return 0 1px $c; }
|
||||
}
|
||||
|
||||
@mixin _shadows($list...) {
|
||||
//
|
||||
// Helper mixin to stack up to box-shadows;
|
||||
//
|
||||
$shadows: null;
|
||||
|
||||
@each $shadow in $list {
|
||||
@if $shadow!=none { $shadows: $shadows, $shadow; }
|
||||
}
|
||||
|
||||
box-shadow: $shadows;
|
||||
}
|
||||
|
||||
// entries
|
||||
@function entry_focus_border($fc:$selected_bg_color) {
|
||||
@if $variant == 'light' { @return $fc; }
|
||||
@else { @return if($fc==$selected_bg_color, $selected_borders_color, darken($fc, 35%)); }
|
||||
}
|
||||
|
||||
@function entry_focus_shadow($fc:$selected_bg_color) { @return inset 0 0 0 1px $fc; }
|
||||
|
||||
@mixin entry($t, $fc:$selected_bg_color, $edge: none) {
|
||||
//
|
||||
// Entries drawing function
|
||||
//
|
||||
// $t: entry type
|
||||
// $fc: focus color
|
||||
// $edge: set to none to not draw the bottom edge or specify a color to not
|
||||
// use the default one
|
||||
//
|
||||
// possible $t values:
|
||||
// normal, focus, insensitive, backdrop, backdrop-insensitive, osd, osd-focus, osd-backdrop;
|
||||
//
|
||||
|
||||
$_blank_edge: if($edge == none, none, 0 1px transparentize($edge, 1));
|
||||
$_entry_edge: if($edge == none, none, _widget_edge($edge));
|
||||
|
||||
@if $t==normal {
|
||||
color: $text_color;
|
||||
border-color: $borders_color;
|
||||
background-color: $base_color;
|
||||
@include _shadows(entry_focus_shadow(transparentize($fc, 1)), $_entry_edge);
|
||||
// for the transition to work the number of shadows in different states needs to match, hence the transparent shadow here.
|
||||
}
|
||||
@if $t==focus {
|
||||
@include _shadows(entry_focus_shadow($fc), $_entry_edge);
|
||||
border-color: entry_focus_border($fc);
|
||||
}
|
||||
@if $t==insensitive {
|
||||
color: $insensitive_fg_color;
|
||||
border-color: $borders_color;
|
||||
background-color: $insensitive_bg_color;
|
||||
box-shadow: $_entry_edge;
|
||||
}
|
||||
@if $t==backdrop {
|
||||
color: $backdrop_text_color;
|
||||
border-color: $backdrop_borders_color;
|
||||
background-color: $backdrop_base_color;
|
||||
box-shadow: $_blank_edge;
|
||||
}
|
||||
@if $t==backdrop-insensitive {
|
||||
color: $backdrop_insensitive_color;
|
||||
border-color: $backdrop_borders_color;
|
||||
background-color: $insensitive_bg_color;
|
||||
box-shadow: $_blank_edge;
|
||||
}
|
||||
@if $t==osd {
|
||||
color: $osd_text_color;
|
||||
border-color: $osd_borders_color;
|
||||
background-color: transparentize(opacify($osd_borders_color, 1), 0.5);
|
||||
background-clip: padding-box;
|
||||
box-shadow: none;
|
||||
text-shadow: 0 1px black;
|
||||
-gtk-icon-shadow: 0 1px black;
|
||||
}
|
||||
@if $t==osd-focus {
|
||||
color: $osd_text_color;
|
||||
border-color: $selected_bg_color;
|
||||
background-color: transparentize(opacify($osd_borders_color, 1), 0.5);
|
||||
background-clip: padding-box;
|
||||
box-shadow: entry_focus_shadow($fc);
|
||||
text-shadow: 0 1px black;
|
||||
-gtk-icon-shadow: 0 1px black;
|
||||
}
|
||||
@if $t==osd-insensitive {
|
||||
color: $osd_insensitive_fg_color;
|
||||
border-color: $osd_borders_color;
|
||||
background-color: $osd_insensitive_bg_color;
|
||||
background-clip: padding-box;
|
||||
box-shadow: none;
|
||||
text-shadow: none;
|
||||
-gtk-icon-shadow: none;
|
||||
}
|
||||
@if $t==osd-backdrop {
|
||||
color: $osd_text_color;
|
||||
border-color: $osd_borders_color;
|
||||
background-color: transparentize(opacify($osd_borders_color, 1), 0.5);
|
||||
background-clip: padding-box;
|
||||
box-shadow: none;
|
||||
text-shadow: none;
|
||||
-gtk-icon-shadow: none;
|
||||
}
|
||||
}
|
||||
|
||||
// buttons
|
||||
|
||||
@function _border_color($c, $darker: false) {
|
||||
@if $darker == true { @return darken($c, 20%); }
|
||||
@else { @return darken($c, 10%); }
|
||||
}
|
||||
|
||||
@function _text_shadow_color ($tc: $fg_color, $bg: $bg_color) {
|
||||
//
|
||||
// calculate the color of text shadows
|
||||
//
|
||||
// $tc is the text color
|
||||
// $bg is the background color
|
||||
//
|
||||
$_lbg: lightness($bg)/100%;
|
||||
@if lightness($tc)<50% { @return transparentize(white, 1-$_lbg/($_lbg*1.3)); }
|
||||
@else { @return transparentize(black, $_lbg*0.8); }
|
||||
}
|
||||
|
||||
@function _button_hilight_color($c) {
|
||||
//
|
||||
// calculate the right top hilight color for buttons
|
||||
//
|
||||
// $c: base color;
|
||||
//
|
||||
@if lightness($c)>95% { @return white; }
|
||||
@else if lightness($c)>90% { @return transparentize(white, 0.2); }
|
||||
@else if lightness($c)>80% { @return transparentize(white, 0.5); }
|
||||
@else if lightness($c)>50% { @return transparentize(white, 0.8); }
|
||||
@else if lightness($c)>40% { @return transparentize(white, 0.9); }
|
||||
@else { @return transparentize(white, 0.98); }
|
||||
}
|
||||
|
||||
@mixin _button_text_shadow ($tc:$fg_color, $bg:$bg_color) {
|
||||
//
|
||||
// helper function for the text emboss effect
|
||||
//
|
||||
// $tc is the optional text color, not the shadow color
|
||||
//
|
||||
// TODO: this functions needs a way to deal with special cases
|
||||
//
|
||||
|
||||
$_shadow: _text_shadow_color($tc, $bg);
|
||||
|
||||
@if lightness($tc)<50% {
|
||||
text-shadow: 0 1px $_shadow;
|
||||
-gtk-icon-shadow: 0 1px $_shadow;
|
||||
}
|
||||
@else {
|
||||
text-shadow: 0 -1px $_shadow;
|
||||
-gtk-icon-shadow: 0 -1px $_shadow;
|
||||
}
|
||||
}
|
||||
|
||||
@mixin button($t, $c:$bg_color, $tc:$fg_color, $edge: none) {
|
||||
//
|
||||
// Button drawing function
|
||||
//
|
||||
// $t: button type,
|
||||
// $c: base button color for colored* types
|
||||
// $tc: optional text color for colored* types
|
||||
// $edge: set to none to not draw the bottom edge or specify a color to not
|
||||
// use the default one
|
||||
//
|
||||
// possible $t values:
|
||||
// normal, hover, active, insensitive, insensitive-active,
|
||||
// backdrop, backdrop-active, backdrop-insensitive, backdrop-insensitive-active,
|
||||
// osd, osd-hover, osd-active, osd-insensitive, osd-backdrop, undecorated
|
||||
//
|
||||
// This mixin sets the $button_fill global variable which containts the button background-image
|
||||
//
|
||||
$_hilight_color: _button_hilight_color($c);
|
||||
$_button_edge: if($edge == none, none, _widget_edge($edge));
|
||||
$_blank_edge: if($edge == none, none, _widget_edge(transparentize($edge,1)));
|
||||
$_button_shadow: 0 1px 2px transparentize($shadow_color, 0.03);
|
||||
|
||||
@if $t==normal {
|
||||
//
|
||||
// normal button
|
||||
//
|
||||
color: $tc;
|
||||
outline-color: transparentize($tc, 0.7);
|
||||
border-color: if($c != $bg_color, _border_color($c), $borders_color);
|
||||
border-bottom-color: if($c != $bg_color, _border_color($c, true), $alt_borders_color);
|
||||
$button_fill: if($variant == 'light', linear-gradient(to top, darken($c, 4%) 2px, $c),
|
||||
linear-gradient(to top, darken($c,1%) 2px, $c)) !global;
|
||||
background-image: $button_fill;
|
||||
@include _button_text_shadow($tc, $c);
|
||||
@include _shadows(inset 0 1px $_hilight_color, $_button_edge, $_button_shadow);
|
||||
}
|
||||
|
||||
@else if $t==hover {
|
||||
//
|
||||
// hovered button
|
||||
//
|
||||
color: $tc;
|
||||
outline-color: transparentize($tc, 0.7);
|
||||
border-color: if($c != $bg_color, _border_color($c), $borders_color);
|
||||
border-bottom-color: if($c != $bg_color, _border_color($c, true), $alt_borders_color);
|
||||
@if $variant == 'light' {
|
||||
$button_fill: linear-gradient(to top, $c, lighten($c, 1%) 1px) !global;
|
||||
@include _button_text_shadow($tc, lighten($c, 6%));
|
||||
@include _shadows(inset 0 1px _button_hilight_color(lighten($c, 6%)), $_button_edge, $_button_shadow);
|
||||
}
|
||||
@else {
|
||||
$button_fill: linear-gradient(to top, darken($c,1%), lighten($c, 1%) 1px) !global;
|
||||
@include _button_text_shadow($tc,lighten($c, 6%));
|
||||
@include _shadows(inset 0 1px _button_hilight_color(darken($c, 2%)), $_button_edge, $_button_shadow);
|
||||
}
|
||||
background-image: $button_fill;
|
||||
}
|
||||
|
||||
@else if $t==active {
|
||||
//
|
||||
// pushed button
|
||||
//
|
||||
color: $tc;
|
||||
outline-color: transparentize($tc, 0.7);
|
||||
border-color: if($c != $bg_color, _border_color($c), $borders_color);
|
||||
$button_fill: if($variant == 'light', image(darken($c, 14%)), image(darken($c, 9%))) !global;
|
||||
background-image: $button_fill;
|
||||
@include _shadows(inset 0 3px 3px -2px transparentize($shadow_color, 0.03), $_button_edge);
|
||||
|
||||
text-shadow: none;
|
||||
-gtk-icon-shadow: none;
|
||||
}
|
||||
|
||||
@if $t==normal-alt {
|
||||
//
|
||||
// normal button alternative look
|
||||
//
|
||||
color: $tc;
|
||||
outline-color: transparentize($tc, 0.7);
|
||||
border-color: if($c != $bg_color, _border_color($c, true), $alt_borders_color);
|
||||
@include _button_text_shadow($tc, $c);
|
||||
@if $variant == 'light' {
|
||||
background-image: linear-gradient(to bottom, lighten($c, 5%) 20%, $c 90%);
|
||||
@include _shadows(inset 0 1px _button_hilight_color(lighten($c, 6%)),
|
||||
$_button_edge, $_button_shadow);
|
||||
}
|
||||
@else {
|
||||
background-image: linear-gradient(to bottom, darken($c, 3%) 20%, darken($c, 6%) 90%);
|
||||
@include _shadows(inset 0 1px $_hilight_color,
|
||||
$_button_edge, $_button_shadow);
|
||||
}
|
||||
}
|
||||
|
||||
@else if $t==hover-alt {
|
||||
//
|
||||
// hovered button alternative look
|
||||
//
|
||||
color: $tc;
|
||||
outline-color: transparentize($tc, 0.7);
|
||||
border-color: if($c != $bg_color, _border_color($c, true), $alt_borders_color);
|
||||
@if $variant == 'light' {
|
||||
$button_fill: linear-gradient(to bottom, lighten($c, 9%) 10%, lighten($c, 4%) 90%) !global;
|
||||
@include _shadows(inset 0 1px _button_hilight_color(lighten($c, 6%)),
|
||||
$_button_edge, $_button_shadow);
|
||||
}
|
||||
@else {
|
||||
$button_fill: linear-gradient(to bottom, $c 20%, darken($c, 4%) 90%) !global;
|
||||
@include _shadows(inset 0 1px $_hilight_color,
|
||||
$_button_edge, $_button_shadow);
|
||||
}
|
||||
background-image: $button_fill;
|
||||
}
|
||||
|
||||
@else if $t==active-alt {
|
||||
//
|
||||
// pushed button
|
||||
//
|
||||
color: $tc;
|
||||
outline-color: transparentize($tc, 0.7);
|
||||
border-color: if($c != $bg_color, _border_color($c), $borders_color);
|
||||
$button_fill: if($variant == 'light', image(lighten($c, 14%)), image(darken($c, 9%))) !global;
|
||||
background-image: $button_fill;
|
||||
@include _shadows(inset 0 1px transparentize($_hilight_color, 1), $_button_edge);
|
||||
@if $variant == 'light' {
|
||||
@include _shadows(inset 0 1px _button_hilight_color(lighten($c, 6%)),
|
||||
$_button_edge, $_button_shadow);
|
||||
}
|
||||
@else {
|
||||
@include _shadows(inset 0 1px $_hilight_color,
|
||||
$_button_edge, $_button_shadow);
|
||||
}
|
||||
}
|
||||
|
||||
@else if $t==insensitive {
|
||||
//
|
||||
// insensitive button
|
||||
//
|
||||
$_bg: if($c != $bg_color, mix($c, $base_color, 85%), $insensitive_bg_color);
|
||||
|
||||
label, & { color: if($tc != $fg_color, mix($tc, $_bg, 50%), $insensitive_fg_color); }
|
||||
|
||||
border-color: if($c != $bg_color, _border_color($c), $insensitive_borders_color);
|
||||
$button_fill: image($_bg) !global;
|
||||
background-image: $button_fill;
|
||||
text-shadow: none;
|
||||
-gtk-icon-shadow: none;
|
||||
// white with 0 alpha to avoid an ugly transition, since no color means
|
||||
// black with 0 alpha
|
||||
@include _shadows(inset 0 1px transparentize(white, 1), $_button_edge);
|
||||
}
|
||||
|
||||
@else if $t==insensitive-active {
|
||||
//
|
||||
// insensitive pushed button
|
||||
//
|
||||
$_bg: if($variant == 'light', darken(mix($c, $base_color, 85%), 8%), darken(mix($c, $base_color, 85%), 6%));
|
||||
$_bc: if($c != $bg_color, _border_color($c), $insensitive_borders_color);
|
||||
|
||||
label, & { color: if($c != $bg_color, mix($tc, $_bg, 60%), $insensitive_fg_color); }
|
||||
|
||||
border-color: $_bc;
|
||||
$button_fill: image($_bg) !global;
|
||||
background-image: $button_fill;
|
||||
// white with 0 alpha to avoid an ugly transition, since no color means
|
||||
// black with 0 alpha
|
||||
@include _shadows(inset 0 1px transparentize(white, 1), $_button_edge);
|
||||
}
|
||||
|
||||
@else if $t==backdrop {
|
||||
//
|
||||
// backdrop button
|
||||
//
|
||||
$_bg: if($c != $bg_color, $c, $backdrop_bg_color);
|
||||
$_bc: if($variant == 'light', $c, _border_color($c));
|
||||
|
||||
label, & { color: if($tc != $fg_color, mix($tc, $_bg, 80%), $backdrop_fg_color); }
|
||||
|
||||
border-color: if($c != $bg_color, $_bc, $backdrop_borders_color);
|
||||
$button_fill: image($_bg) !global;
|
||||
background-image: $button_fill;
|
||||
text-shadow: none;
|
||||
-gtk-icon-shadow: none;
|
||||
@include _shadows(inset 0 1px transparentize(white, 1), $_blank_edge);
|
||||
}
|
||||
|
||||
@else if $t==backdrop-active {
|
||||
//
|
||||
// backdrop pushed button
|
||||
//
|
||||
$_bg: if($variant == 'light', darken(mix($c, $base_color, 85%), 8%), darken(mix($c, $base_color, 85%), 4%));
|
||||
$_bc: if($variant == 'light', $_bg ,_border_color($c));
|
||||
|
||||
label, & { color: if($tc != $fg_color, mix($tc, $_bg, 80%), $backdrop_fg_color); }
|
||||
|
||||
border-color: if($c != $bg_color, $_bc, $backdrop_borders_color);
|
||||
$button_fill: image($_bg) !global;
|
||||
background-image: $button_fill;
|
||||
@include _shadows(inset 0 1px transparentize(white, 1), $_blank_edge);
|
||||
}
|
||||
|
||||
@else if $t==backdrop-insensitive {
|
||||
//
|
||||
// backdrop insensitive button
|
||||
//
|
||||
|
||||
$_bg: if($c != $bg_color, mix($c, $base_color, 85%), $insensitive_bg_color);
|
||||
$_bc: if($variant == 'light', $_bg,_border_color($c));
|
||||
|
||||
label, & { color: if($c != $bg_color, mix($tc, $_bg, 35%), $backdrop_insensitive_color); }
|
||||
|
||||
border-color: if($c != $bg_color, $_bc, $backdrop_borders_color);
|
||||
$button_fill: image($_bg) !global;
|
||||
background-image: $button_fill;
|
||||
text-shadow: none;
|
||||
-gtk-icon-shadow: none;
|
||||
// white with 0 alpha to avoid an ugly transition, since no color means
|
||||
// black with 0 alpha
|
||||
@include _shadows(inset 0 1px transparentize(white, 1), $_blank_edge);
|
||||
}
|
||||
|
||||
@else if $t==backdrop-insensitive-active {
|
||||
//
|
||||
// backdrop insensitive pushed button
|
||||
//
|
||||
|
||||
$_bg: if($variant == 'light', darken(mix($c, $base_color, 85%), 8%), darken(mix($c, $base_color, 85%), 4%));
|
||||
$_bc: if($variant == 'light', $_bg, _border_color($c));
|
||||
|
||||
label { color: if($c != $bg_color, mix($tc, $_bg, 35%), $backdrop_insensitive_color); }
|
||||
|
||||
border-color: if($c != $bg_color, $_bc, $backdrop_borders_color);
|
||||
$button_fill: image($_bg) !global;
|
||||
background-image: $button_fill;
|
||||
@include _shadows(inset 0 1px transparentize(white, 1), $_blank_edge);
|
||||
}
|
||||
|
||||
@else if $t==osd {
|
||||
//
|
||||
// normal osd button
|
||||
//
|
||||
$_bg: if($c != $bg_color, transparentize($c, 0.5), $osd_bg_color);
|
||||
|
||||
color: $osd_fg_color;
|
||||
border-color: $osd_borders_color;
|
||||
background-color: transparent;
|
||||
$button_fill: image($_bg) !global;
|
||||
background-image: $button_fill;
|
||||
background-clip: padding-box;
|
||||
box-shadow: inset 0 1px transparentize(white, 0.9);
|
||||
text-shadow: 0 1px black;
|
||||
-gtk-icon-shadow: 0 1px black;
|
||||
outline-color: transparentize($osd_fg_color, 0.7);
|
||||
}
|
||||
|
||||
@else if $t==osd-hover {
|
||||
//
|
||||
// active osd button
|
||||
//
|
||||
$_bg: if($c != $bg_color, transparentize($c, 0.3), lighten($osd_bg_color, 12%));
|
||||
|
||||
color: white;
|
||||
border-color: $osd_borders_color;
|
||||
background-color: transparent;
|
||||
$button_fill: image($_bg) !global;
|
||||
background-image: $button_fill;
|
||||
background-clip: padding-box;
|
||||
box-shadow: inset 0 1px transparentize(white, 0.9);
|
||||
text-shadow: 0 1px black;
|
||||
-gtk-icon-shadow: 0 1px black;
|
||||
outline-color: transparentize($osd_fg_color, 0.7);
|
||||
}
|
||||
|
||||
@else if $t==osd-active {
|
||||
//
|
||||
// active osd button
|
||||
//
|
||||
$_bg: if($c != $bg_color, $c, $osd_borders_color);
|
||||
|
||||
color: white;
|
||||
border-color: $osd_borders_color;
|
||||
background-color: transparent;
|
||||
$button_fill: image($_bg) !global;
|
||||
background-image: $button_fill;
|
||||
background-clip: padding-box;
|
||||
box-shadow: none;
|
||||
text-shadow: none;
|
||||
-gtk-icon-shadow: none;
|
||||
outline-color: transparentize($osd_fg_color, 0.7);
|
||||
}
|
||||
|
||||
@else if $t==osd-insensitive {
|
||||
//
|
||||
// insensitive osd button
|
||||
//
|
||||
color: $osd_insensitive_fg_color;
|
||||
border-color: $osd_borders_color;
|
||||
background-color: transparent;
|
||||
$button_fill: image($osd_insensitive_bg_color) !global;
|
||||
background-image: $button_fill;
|
||||
background-clip: padding-box;
|
||||
box-shadow: none;
|
||||
text-shadow: none;
|
||||
-gtk-icon-shadow: none;
|
||||
}
|
||||
|
||||
@else if $t==osd-backdrop {
|
||||
//
|
||||
// backdrop osd button
|
||||
//
|
||||
$_bg: if($c != $bg_color, transparentize($c, 0.5), $osd_bg_color);
|
||||
|
||||
color: $osd_fg_color;
|
||||
border-color: $osd_borders_color;
|
||||
background-color: transparent;
|
||||
$button_fill: image($_bg) !global;
|
||||
background-image: $button_fill;
|
||||
background-clip: padding-box;
|
||||
box-shadow: none;
|
||||
text-shadow: none;
|
||||
-gtk-icon-shadow: none;
|
||||
}
|
||||
|
||||
@else if $t==undecorated {
|
||||
//
|
||||
// reset
|
||||
//
|
||||
border-color: transparent;
|
||||
background-color: transparent;
|
||||
$button_fill: none !global;
|
||||
background-image: $button_fill;
|
||||
|
||||
@include _shadows(inset 0 1px transparentize(white, 1), $_blank_edge);
|
||||
|
||||
text-shadow: none;
|
||||
-gtk-icon-shadow: none;
|
||||
}
|
||||
}
|
||||
|
||||
@mixin headerbar_fill($c:$headerbar_color, $hc:$top_hilight, $ov: none) {
|
||||
//
|
||||
// headerbar fill
|
||||
//
|
||||
// $c: base color
|
||||
// $hc: top highlight color
|
||||
// $ov: a background layer for background shorthand (hence no commas!)
|
||||
//
|
||||
$gradient: linear-gradient(to top, darken($c, 2%), lighten($c, 1%));
|
||||
|
||||
@if $variant == 'dark' { $gradient: linear-gradient(to top, lighten($c, 4%), lighten($c, 6%)); }
|
||||
|
||||
@if $ov != none { background: $c $ov, $gradient; }
|
||||
@else { background: $c $gradient; }
|
||||
|
||||
box-shadow: inset 0 1px $hc; // top highlight
|
||||
}
|
||||
|
||||
@mixin overshoot($p, $t:normal, $c:$fg_color) {
|
||||
//
|
||||
// overshoot
|
||||
//
|
||||
// $p: position
|
||||
// $t: type
|
||||
// $c: base color
|
||||
//
|
||||
// possible $p values:
|
||||
// top, bottom, right, left
|
||||
//
|
||||
// possible $t values:
|
||||
// normal, backdrop
|
||||
//
|
||||
|
||||
$_small_gradient_length: 5%;
|
||||
$_big_gradient_length: 100%;
|
||||
|
||||
$_position: center top;
|
||||
$_small_gradient_size: 100% $_small_gradient_length;
|
||||
$_big_gradient_size: 100% $_big_gradient_length;
|
||||
|
||||
@if $p==bottom {
|
||||
$_position: center bottom;
|
||||
$_linear_gradient_direction: to top;
|
||||
}
|
||||
|
||||
@else if $p==right {
|
||||
$_position: right center;
|
||||
$_small_gradient_size: $_small_gradient_length 100%;
|
||||
$_big_gradient_size: $_big_gradient_length 100%;
|
||||
}
|
||||
|
||||
@else if $p==left {
|
||||
$_position: left center;
|
||||
$_small_gradient_size: $_small_gradient_length 100%;
|
||||
$_big_gradient_size: $_big_gradient_length 100%;
|
||||
}
|
||||
|
||||
$_small_gradient_color: $c;
|
||||
$_big_gradient_color: $c;
|
||||
|
||||
@if $c==$fg_color {
|
||||
$_small_gradient_color: darken($borders_color, 10%);
|
||||
$_big_gradient_color: $fg_color;
|
||||
|
||||
@if $t==backdrop { $_small_gradient_color: $backdrop_borders_color; }
|
||||
}
|
||||
|
||||
$_small_gradient: -gtk-gradient(radial,
|
||||
$_position, 0,
|
||||
$_position, 0.5,
|
||||
to($_small_gradient_color),
|
||||
to(transparentize($_small_gradient_color, 1)));
|
||||
|
||||
$_big_gradient: -gtk-gradient(radial,
|
||||
$_position, 0,
|
||||
$_position, 0.6,
|
||||
from(transparentize($_big_gradient_color, 0.93)),
|
||||
to(transparentize($_big_gradient_color, 1)));
|
||||
|
||||
@if $t==normal {
|
||||
background-image: $_small_gradient, $_big_gradient;
|
||||
background-size: $_small_gradient_size, $_big_gradient_size;
|
||||
}
|
||||
|
||||
@else if $t==backdrop {
|
||||
background-image: $_small_gradient;
|
||||
background-size: $_small_gradient_size;
|
||||
}
|
||||
|
||||
background-repeat: no-repeat;
|
||||
background-position: $_position;
|
||||
|
||||
background-color: transparent; // reset some properties to be sure to not inherit them somehow
|
||||
border: none; //
|
||||
box-shadow: none; //
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
$variant: 'dark';
|
||||
|
||||
@import 'colors';
|
||||
@import 'drawing';
|
||||
@import 'common';
|
||||
@import 'applications';
|
||||
@import 'colors-public';
|
||||
@@ -0,0 +1,13 @@
|
||||
// General guidelines:
|
||||
// - very unlikely you want to edit something else than _common.scss
|
||||
// - keep the number of defined colors to a minimum, use the color blending functions if
|
||||
// you need a subtle shade
|
||||
// - if you need to inverse a color function use the @if directive to match for dark $variant
|
||||
|
||||
$variant: 'light';
|
||||
|
||||
@import 'colors';
|
||||
@import 'drawing';
|
||||
@import 'common';
|
||||
@import 'applications';
|
||||
@import 'colors-public';
|
||||
Reference in New Issue
Block a user