numix-gtk-theme/gtk-3.0/scss/_base.scss

204 lines
4.3 KiB
SCSS
Executable File

@import "functions";
@import "global";
* {
-GtkArrow-arrow-scaling: 0.5;
-GtkButton-child-displacement-x: 0;
-GtkButton-child-displacement-y: 0;
-GtkButton-default-border: 0;
-GtkButton-image-spacing: 0;
-GtkButton-inner-border: 1;
-GtkButton-interior-focus: true;
-GtkButtonBox-child-min-height: 24;
-GtkButtonBox-child-internal-pad-y: 1;
-GtkCheckButton-indicator-size: 16;
-GtkCheckMenuItem-indicator-size: 14;
-GtkExpander-expander-size: 8;
-GtkMenu-horizontal-padding: 0;
-GtkMenu-vertical-padding: 0;
-GtkPaned-handle-size: 4;
-GtkProgressBar-min-horizontal-bar-height: 12;
-GtkProgressBar-min-vertical-bar-width: 12;
-GtkRange-slider-width: 12;
-GtkRange-stepper-spacing: 0;
-GtkRange-trough-border: 0;
-GtkRange-trough-under-steppers: 1;
-GtkScrollbar-has-backward-stepper: false;
-GtkScrollbar-has-forward-stepper: false;
-GtkScrollbar-min-slider-length: 80;
-GtkScrolledWindow-scrollbar-spacing: 0;
-GtkScrolledWindow-scrollbars-within-bevel: 1;
-GtkStatusbar-shadow-type: none;
-GtkTextView-error-underline-color: $error_color;
-GtkToolButton-icon-spacing: 6;
-GtkToolItemGroup-expander-size: 8;
-GtkTreeView-expander-size: 8;
-GtkWindow-resize-grip-height: 0;
-GtkWindow-resize-grip-width: 0;
-WnckTasklist-fade-overlay-rect: 0;
/* legacy stuff */
-GtkWidget-focus-line-width: 1;
-GtkWidget-focus-padding: 0;
outline-color: alpha($selected_bg_color, 0.5);
outline-style: dashed;
outline-width: 1px;
outline-offset: -2px;
outline-radius: 2px;
}
/***************
* base states *
***************/
%selected_items {
&, &:focus {
background-color: $selected_bg_color;
color: $selected_fg_color;
}
}
* {
&:selected { @extend %selected_items; }
&:insensitive,
&:insensitive:insensitive { color: mix($fg_color, $bg_color, 0.50); }
&:insensitive { -gtk-image-effect: dim; }
&:hover { -gtk-image-effect: highlight; }
/* hyperlinks */
-GtkHTML-link-color: $link_color;
-GtkIMHtml-hyperlink-color: $link_color;
-GtkWidget-link-color: $link_color;
-GtkWidget-visited-link-color: $link_color;
&:link, &:visited { color: $link_color; }
}
.background {
background-color: $bg_color;
color: $fg_color;
&:backdrop {
text-shadow: none;
icon-shadow: none;
}
}
.gtkstyle-fallback {
background-color: $bg_color;
color: $fg_color;
&:prelight {
background-color: shade($bg_color, 1.1);
color: $fg_color;
}
&:active {
background-color: shade($bg_color, 0.9);
color: $fg_color;
}
&:insensitive {
background-color: shade(shade($bg_color, 0.95), 1.05);
color: mix($fg_color, $bg_color, 0.50);
}
&:selected { @extend %selected_items; }
}
GtkImage, GtkLabel, GtkBox, GtkGrid {
&, &:insensitive { background-color: transparent; }
}
GtkLabel {
&.separator {
color: $fg_color;
@extend .dim-label;
}
&:selected { @extend %selected_items; }
&:insensitive { color: mix($fg_color, $bg_color, 0.50); }
}
.dim-label {
opacity: 0.5;
text-shadow: none;
}
.view {
color: $text_color;
background-color: $base_color;
&:selected { @extend %selected_items; }
}
.rubberband {
border: 1px solid $selected_bg_color;
background-color: alpha($selected_bg_color, 0.2);
}
/* used by GtkScrolledWindow, shown when content is touch-dragged past boundaries. */
.overshoot { background-color: alpha($selected_bg_color, 0.2); }
GtkAssistant {
.sidebar {
background-color: $base_color;
border-top: 1px solid border_normal($base_color);
&:dir(ltr) { border-right: 1px solid border_normal($base_color); }
&:dir(rtl) { border-left: 1px solid border_normal($base_color); }
GtkLabel {
padding: $spacing ($spacing * 2);
&.highlight { background-color: mix($bg_color, $fg_color, 0.80); }
}
}
&.csd .sidebar { border-top-style: none; }
}
GtkTextView {
/* this will get overridden by .view, needed by gedit line numbers */
background-color: mix($bg_color, $base_color, 0.50);
}
GtkFlowBox .grid-child {
padding: 3px;
border-radius: 3px;
&:selected {
@extend %selected_items;
outline-offset: -2px;
}
}
/*********************
* spinner animation *
*********************/
@keyframes spin {
to { -gtk-icon-transform: rotate(1turn); }
}
.spinner {
background-image: none;
background-color: blue;
opacity: 0; // non spinning spinner makes no sense
-gtk-icon-source: -gtk-icontheme("process-working-symbolic");
&:active {
opacity: 1;
animation: spin 1s linear infinite;
&:insensitive { opacity: 0.5; }
}
}