Wrap modules in exports mixin so they are included only once

pull/224/head
Satyajit Sahoo 2014-12-09 01:05:19 +05:30
parent f34745f3da
commit 0163f1997a
16 changed files with 988 additions and 1015 deletions

View File

@ -145,6 +145,7 @@
.linked & { @include linked_button($bg, $dark_shadow); }
}
@include exports("button") {
%close_button {
border: 1px solid transparent;
background-color: transparent;
@ -171,3 +172,4 @@
&.default { @include button($selected_bg_color, $selected_fg_color); }
}
}

View File

@ -6,6 +6,7 @@
! Calendar
***********/
@include exports("calendar") {
GtkCalendar {
padding: $spacing;
outline-offset: -1px;
@ -22,3 +23,5 @@ GtkCalendar {
&.highlight { color: $selected_bg_color; }
}
}

View File

@ -72,13 +72,16 @@
&.image.left { padding-right: $spacing; }
}
@include exports("entry") {
.entry { @include entry($base_color, $text_color); }
}
/******************
! Combobox entry *
*******************/
@include exports("comboboxentry") {
GtkComboBox.combobox-entry {
.entry {
&, &:hover, &:focus, &:active, &:insensitive {
@ -96,3 +99,5 @@ GtkComboBox.combobox-entry {
}
}
}
}

View File

@ -13,7 +13,7 @@
&-row {
border: none;
border-radius: 0;
padding: 3px;
padding: $spacing;
background-image: none;
background-color: transparent;

View File

@ -7,6 +7,7 @@
! Infobar
**********/
@include exports("infobar") {
GtkInfoBar {
border: none;
@ -36,3 +37,4 @@ GtkInfoBar {
}
}
}
}

View File

@ -7,6 +7,7 @@
! Menubar
**********/
@include exports("menubar") {
.menubar {
-GtkWidget-window-dragging: true;
@ -33,12 +34,14 @@
& *:hover { color: shade($menubar_fg_color, 1.08); }
}
}
}
/******
! Menu
*******/
@include exports("menu") {
GtkTreeMenu, GtkMenuToolButton, GtkComboBox {
&.menu, .menu {
background-color: $menu_bg_color;
@ -150,12 +153,14 @@ GtkTreeMenu, GtkMenuToolButton, GtkComboBox {
}
GtkModelMenuItem GtkBox GtkImage { padding-right: $spacing; }
}
/*********
! Popover
**********/
@include exports("popover") {
GtkPopover {
@include border($menu_bg_color);
@ -221,3 +226,4 @@ GtkModelButton.button {
border-radius: 2px;
}
}
}

View File

@ -1,10 +1,12 @@
@import "functions";
@import "global";
/**********
! Notebook
***********/
@include exports("notebook") {
.notebook {
padding: 0;
border-width: 1px 0 0 0;
@ -132,3 +134,4 @@
}
}
}
}

View File

@ -6,6 +6,7 @@
! Progress bars *
******************/
@include exports("progressbar") {
GtkProgressBar {
padding: 0;
border-radius: $roundness;
@ -193,3 +194,4 @@ GtkLevelBar {
}
}
}
}

View File

@ -5,6 +5,7 @@
! Scrollbar
************/
@include exports("scrollbar") {
.scrollbar {
border: none;
padding: 0;
@ -59,3 +60,4 @@ OsThumb, OsScrollbar {
&:insensitive { background-color: shade($bg_color, 0.9); }
}
}

View File

@ -6,6 +6,7 @@
! Sidebar
**********/
@include exports("sidebar") {
.sidebar {
&, &.view, & .view, & GtkScrolledWindow {
background-color: $bg_color;
@ -71,13 +72,18 @@
.highlight { font: bold; }
}
}
}
/***************
! Pane separator
****************/
@include exports("paneseparator") {
.pane-separator {
background-color: $bg_color;
color: transparent;
&, &.horizontal {
background-image: linear-gradient(to bottom,
shade($bg_color, 0.8) 0%,
@ -116,3 +122,4 @@
background-position: center center;
}
}
}

View File

@ -6,6 +6,7 @@
! Spinner animation
********************/
@include exports("spinner") {
@keyframes spin {
to { -gtk-icon-transform: rotate(1turn); }
}
@ -24,3 +25,4 @@
&:insensitive { opacity: 0.5; }
}
}
}

View File

@ -6,11 +6,6 @@
! Check and Radio items
************************/
* {
-GtkCheckButton-indicator-size: 16;
-GtkCheckMenuItem-indicator-size: 14;
}
@mixin toggle($type) {
background-image: none;
@ -53,6 +48,12 @@
}
}
@include exports("checkradio") {
* {
-GtkCheckButton-indicator-size: 16;
-GtkCheckMenuItem-indicator-size: 14;
}
.radio { @include toggle("radio"); }
.check { @include toggle("checkbox"); }
@ -62,12 +63,14 @@ GtkIconView.content-view.cell.check {
&:active { -gtk-icon-source: url("assets/grid-selection-checked.svg"); }
}
}
/********
! Switch
*********/
@include exports("switch") {
GtkSwitch {
padding: 0;
border-radius: $roundness;
@ -102,3 +105,4 @@ GtkSwitch {
}
}
}
}

View File

@ -49,6 +49,7 @@
.menubar { -GtkToolbar-button-relief: normal; }
}
@include exports("toolbar") {
.toolbar {
@include toolbar($bg_color, $fg_color);
@ -113,3 +114,4 @@
}
}
}
}

View File

@ -6,6 +6,7 @@
! Generic views
****************/
@include exports("view") {
.view {
color: $text_color;
background-color: $base_color;
@ -108,12 +109,13 @@ GtkDrawingArea, GtkHTML {
&:insensitive { background-color: shade($base_color, 0.9); }
}
}
/************
! Treeview *
*************/
@include exports("treeview") {
GtkTreeView {
-GtkTreeView-vertical-separator: 0;
@ -127,12 +129,14 @@ GtkTreeView {
background-image: none;
}
}
}
/*********************
! Column view headers
**********************/
@include exports("columnheader") {
column-header {
.button {
&, &:active {
@ -157,12 +161,14 @@ column-header {
&:last-child .button { border-width: 0 0 1px 0; }
}
}
}
/**********
! Frames *
***********/
@include exports("frame") {
.frame { border: none; }
GtkScrolledWindow {
@ -171,12 +177,14 @@ GtkScrolledWindow {
/* avoid double borders when a viewport is packed into a GtkScrolledWindow */
GtkViewport.frame { border: none; }
}
}
/*************
! Expanders *
**************/
@include exports("expander") {
GtkExpander {
padding: $spacing;
outline-offset: 1px;
@ -196,12 +204,14 @@ GtkExpander {
border-color: alpha(currentColor, 0.9);
}
}
}
/*******************
! Symbolic images *
********************/
@include exports("symbolicimage") {
.image {
color: alpha(currentColor, 0.5);
@ -209,15 +219,6 @@ GtkExpander {
&:selected, &:selected:hover { color: $selected_fg_color; }
}
/******************
! Pane separator *
*******************/
.pane-separator {
background-color: $bg_color;
color: transparent;
}
@ -225,6 +226,7 @@ GtkExpander {
! Floating bar *
*****************/
@include exports("floatingbar") {
.floating-bar {
border: 1px solid border_normal($bg_color);
border-radius: $roundness;
@ -265,3 +267,4 @@ GtkExpander {
background-image: none;
}
}
}

View File

@ -6,6 +6,7 @@
! Window frame
***************/
@include exports("window") {
.window-frame {
border: none;
border-radius: $roundness $roundness 0 0;
@ -41,3 +42,4 @@
}
}
}
}

View File

@ -17,78 +17,6 @@
@import "notebook";
@import "scrollbar";
/*************
* scrollbar *
*************/
.scrollbar {
border-width: 1px;
border-style: solid;
padding: 0;
}
.scrollbars-junction,
.scrollbar.trough {
border-width: 0;
border-radius: 0;
background-color: $bg_color;
background-image: none;
}
.scrollbar.button,
.scrollbar.button:active,
.scrollbar.button:active:hover {
border-width: 0;
border-radius: 0;
background-color: transparent;
background-image: none;
color: shade($bg_color, 0.6);
}
.scrollbar.slider {
border-width: 1px;
border-color: mix(shade($bg_color, 0.87), $fg_color, 0.21);
border-radius: 0;
background-color: mix($bg_color, $fg_color, 0.21);
}
.scrollbar.slider:hover,
.scrollbar.slider.vertical:hover {
border-color: mix(shade($bg_color, 0.87), $fg_color, 0.31);
background-color: mix($bg_color, $fg_color, 0.31);
}
.scrollbar.slider:active,
.scrollbar.slider.vertical:active {
border-color: shade($selected_bg_color, 0.9);
background-color: $selected_bg_color;
}
.scrollbar.slider.fine-tune:prelight:active {
border-width: 2px;
border-color: transparent;
}
/* overlay scrollbar */
OsThumb {
color: shade($bg_color, 0.7);
}
OsThumb:selected,
OsScrollbar:selected {
background-color: $selected_bg_color;
}
OsThumb:active,
OsScrollbar:active {
background-color: $selected_bg_color;
}
OsThumb:insensitive,
OsScrollbar:insensitive {
background-color: shade($bg_color, 0.9);
}
/*************
* separator *
*************/