one-dark/cinnamon/sass/var/drawing.scss

138 lines
3.6 KiB
SCSS
Raw Normal View History

2022-05-05 00:11:07 +08:00
// Drawing mixins
// Entries
2022-05-05 19:53:15 +08:00
@mixin entry($t, $dark: false) {
//
// Entries drawing function
//
2022-05-05 00:11:07 +08:00
@if $t==normal {
color: $text_color;
2022-05-05 19:53:15 +08:00
background-color: $grey_color;
// border: 1px solid $entry_border;
2022-05-05 00:11:07 +08:00
box-shadow: inset 0 2px 4px transparentize($entry_bg, 0.95);
}
@if $t==focus {
2022-05-05 19:53:15 +08:00
color: $text_color;
background-color: $grey_color;
// border: 1px solid $selected_bg_color;
2022-05-05 00:11:07 +08:00
box-shadow: inset 0 2px 4px transparentize($entry_bg, 0.95);
}
@if $t==insensitive {
color: $insensitive_fg_color;
background-color: mix($entry_bg, $bg_color, 55%);
border-color: 1px solid mix($entry_border, $bg_color, 55%);
box-shadow: inset 0 2px 4px transparentize(mix($entry_bg, $bg_color, 55%), 0.95);
}
@if $t==osd {
color: $osd_fg_color;
background-color: $osd_entry_bg;
border: 1px solid $osd_entry_border;
box-shadow: inset 0 2px 4px transparentize(black, 0.95);
}
@if $t==osd-focus {
color: $selected_fg_color;
background-color: $selected_bg_color;
border: 1px solid $selected_bg_color;
box-shadow: inset 0 2px 4px transparentize(black, 0.95);
}
@if $t==osd-insensitive {
color: transparentize($osd_fg_color, 0.45);
background-color: transparentize($osd_entry_bg, 0.15);
border: 1px solid $osd_entry_border;
box-shadow: inset 0 2px 4px transparentize(black, 0.95);
}
}
// Buttons
@mixin button($t) {
//
2022-05-05 19:53:15 +08:00
// Button drawing function
2022-05-05 00:11:07 +08:00
//
2022-05-05 19:53:15 +08:00
@if $t==normal {
//
// normal button
//
2022-05-05 00:11:07 +08:00
color: $fg_color;
background-color: $button_bg;
border: 1px solid $borders_color;
box-shadow: inset 0 2px 4px transparentize($button_bg, 0.95);
2022-05-05 19:53:15 +08:00
} @else if $t==focus {
//
// focused button
//
2022-05-05 00:11:07 +08:00
color: $fg_color;
background-color: $button_bg;
border: 1px solid $selected_bg_color;
box-shadow: inset 0 2px 4px transparentize($button_bg, 0.95);
2022-05-05 19:53:15 +08:00
} @else if $t==focus-hover {
//
// focused button
//
2022-05-05 00:11:07 +08:00
color: $fg_color;
background-color: lighten($button_bg, 5%);
border: 1px solid $selected_bg_color;
box-shadow: inset 0 2px 4px transparentize($button_bg, 0.95);
2022-05-05 19:53:15 +08:00
} @else if $t==hover {
//
// hovered button
//
2022-05-05 00:11:07 +08:00
color: $fg_color;
background-color: lighten($button_bg, 5%);
border: 1px solid $borders_color;
box-shadow: inset 0 2px 4px transparentize(lighten($button_bg, 5%), 0.95);
2022-05-05 19:53:15 +08:00
} @else if $t==active {
//
// pushed button
//
2022-05-05 00:11:07 +08:00
color: $selected_fg_color;
background-color: $selected_bg_color;
border: 1px solid $selected_bg_color;
box-shadow: inset 0 2px 4px $selected_bg_color;
2022-05-05 19:53:15 +08:00
} @else if $t==insensitive {
//
// insensitive button
//
2022-05-05 00:11:07 +08:00
color: $insensitive_fg_color;
border: 1px solid transparentize($borders_color, 0.45);
background-color: transparentize($button_bg, 0.45);
box-shadow: inset 0 2px 4px transparentize($button_bg, 0.95);
2022-05-05 19:53:15 +08:00
} @else if $t==osd {
//
// normal osd button
//
2022-05-05 00:11:07 +08:00
color: $osd_fg_color;
border: 1px solid $borders_color;
background-color: $osd_button_bg;
2022-05-05 19:53:15 +08:00
} @else if $t==osd-hover {
//
// active osd button
//
2022-05-05 00:11:07 +08:00
color: $osd_fg_color;
border: 1px solid $osd_button_border;
background-color: opacify(lighten($osd_button_bg, 7%), 0.1);
2022-05-05 19:53:15 +08:00
} @else if $t==osd-active {
//
// active osd button
//
2022-05-05 00:11:07 +08:00
color: $selected_fg_color;
border: 1px solid $selected_bg_color;
background-color: $selected_bg_color;
2022-05-05 19:53:15 +08:00
} @else if $t==osd-insensitive {
//
// insensitive osd button
//
2022-05-05 00:11:07 +08:00
color: $osd_insensitive_fg_color;
border: 1px solid $osd_button_border;
background-color: transparentize($osd_button_bg, 0.15);
}
}