Wrap code in exports mixin

pull/224/head
Satyajit Sahoo 2014-12-28 20:24:48 +05:30
parent 1b99e55e91
commit 7a4b108791
5 changed files with 159 additions and 196 deletions

View File

@ -2,7 +2,8 @@
! Grid and flowbox
*******************/
.list {
@include exports("grid") {
.list {
background-color: shade($bg_color, 0.97);
color: $fg_color;
@ -29,9 +30,9 @@
}
}
}
}
}
.grid-child {
.grid-child {
&, GtkFlowBox & {
padding: $spacing;
border-radius: $roundness;
@ -42,4 +43,6 @@
outline-offset: -2px;
}
}
}
}

View File

@ -2,9 +2,11 @@
! Dimmed label *
****************/
.dim-label {
@include exports("dimlabel") {
.dim-label {
opacity: 0.5;
text-shadow: none;
}
}

View File

@ -5,11 +5,10 @@
! OSD *
********/
GtkOverlay.osd {
background-color: transparent;
}
@include exports("osd") {
GtkOverlay.osd { background-color: transparent; }
.osd {
.osd {
&.background {
background-color: alpha($osd_bg, 0.8);
color: $osd_fg;
@ -43,29 +42,10 @@ GtkOverlay.osd {
.scale {
&.slider {
background-color: shade($osd_bg, 1.08);
background-image: none;
/* we will draw the border using box shadow for now */
box-shadow: inset 1px 0 shade($osd_bg, 0.8),
inset 0 1px shade($osd_bg, 0.8),
inset -1px 0 shade($osd_bg, 0.8),
inset 0 -1px shade($osd_bg, 0.8);
@include linear-gradient(shade($osd_bg, 1.08));
@include border($osd_bg);
&:hover {
box-shadow: inset 1px 0 shade($osd_bg, 0.7),
inset 0 1px shade($osd_bg, 0.7),
inset -1px 0 shade($osd_bg, 0.7),
inset 0 -1px shade($osd_bg, 0.7);
}
&:insensitive {
background-color: shade($osd_bg, 0.9);
background-image: none;
box-shadow: inset 1px 0 shade($osd_bg, 0.85),
inset 0 1px shade($osd_bg, 0.85),
inset -1px 0 shade($osd_bg, 0.85),
inset 0 -1px shade($osd_bg, 0.85);
}
&:insensitive { @include linear-gradient(shade($osd_bg, 0.9)); }
}
&.trough {
@ -124,9 +104,9 @@ GtkOverlay.osd {
/* when there's no pixbuf yet */
background-color: $osd_bg;
}
}
}
.osd GtkProgressBar, GtkProgressBar.osd {
.osd GtkProgressBar, GtkProgressBar.osd {
-GtkProgressBar-xspacing: 0;
-GtkProgressBar-yspacing: 2px;
-GtkProgressBar-min-horizontal-bar-height: 2px;
@ -147,4 +127,5 @@ GtkOverlay.osd {
background-color: $selected_bg_color;
background-image: none;
}
}
}

View File

@ -120,37 +120,14 @@
&.slider {
@include linear-gradient(shade($bg_color, 1.08));
@include border($bg_color);
border-radius: 8px;
border-width: 1px;
border-style: solid;
box-shadow: 0 1px 2px -1px alpha($dark_shadow, .3);
/* we will draw the border using box shadow for now */
box-shadow: inset 1px 0 border_normal($bg_color),
inset 0 1px border_normal($bg_color),
inset -1px 0 border_normal($bg_color),
inset 0 -1px border_normal($bg_color);
&:hover, &:focus {
box-shadow: inset 1px 0 border_focus($bg_color),
inset 0 1px border_focus($bg_color),
inset -1px 0 border_focus($bg_color),
inset 0 -1px border_focus($bg_color);
}
&:active {
box-shadow: inset 1px 0 border_active($bg_color),
inset 0 1px border_active($bg_color),
inset -1px 0 border_active($bg_color),
inset 0 -1px border_active($bg_color);
}
&:insensitive {
@include linear-gradient(shade($bg_color, 0.9));
box-shadow: inset 1px 0 border_insensitive($bg_color),
inset 0 1px border_insensitive($bg_color),
inset -1px 0 border_insensitive($bg_color),
inset 0 -1px border_insensitive($bg_color);
}
&:insensitive { @include linear-gradient(shade($bg_color, 0.9)); }
}
&.fine-tune {

View File

@ -46,7 +46,7 @@
.frame { border-width: 0; }
GtkAssistant & {
padding: 4px;
padding: $spacing;
border-width: 0 1px 0 0;
border-style: solid;
border-right-color: border_normal($bg_color);