Files
Colloid-gtk-theme/src/sass/gnome-shell/_drawing.scss
2024-12-28 23:03:21 +08:00

138 lines
2.8 KiB
SCSS

// provide font size in rem, with px fallback
@mixin fontsize($size: 24, $base: 16) {
font-size: round($size) + pt;
}
@mixin entry($t, $fc: $primary, $tc: $text, $bc: $fill) {
//
// entry
//
@if $t == normal {
color: $tc;
background-color: $bc;
border: 2px solid transparent !important;
box-shadow: none !important;
}
@if $t == hover {
color: $tc;
background-color: $bc;
border: 2px solid $track !important;
box-shadow: none !important;
}
@if $t == focus {
color: $tc;
background-color: $bc;
border: 2px solid $fc !important;
box-shadow: none !important;
}
@if $t == insensitive {
background-color: $bc;
color: rgba($tc, 0.35);
}
@if $t == flat-normal {
background-color: $bc;
border-radius: 0;
border: none !important;
box-shadow: inset 0 -1px rgba($tc, 0.15) !important;
color: $tc;
}
@if $t == flat-hover {
border: none !important;
background-color: $bc;
box-shadow: inset 0 -1px rgba($tc, 0.35) !important;
color: $tc;
}
@if $t == flat-focus {
border: none !important;
background-color: $bc;
box-shadow: inset 0 -2px $fc !important;
color: $tc;
}
@if $t == flat-insensitive {
border: none !important;
box-shadow: none !important;
background-color: $bc;
color: rgba($tc, 0.35);
}
}
@mixin button($t, $fc: $primary, $tc: $text, $bc: $base) {
//
// button
//
@if $t == normal {
color: $tc;
background-color: $bc;
box-shadow: none !important;
}
@if $t == focus {
color: $tc;
box-shadow: none !important;
background-color: if($bc == $primary, rgba(white, 0.08), overlay($bc, focus));
}
@if $t == hover {
color: $tc;
box-shadow: none !important;
background-color: if($bc == $primary, rgba(white, 0.08), overlay($bc, hover));
}
@if $t == active {
color: $tc;
box-shadow: none !important;
background-color: if($bc == $primary, rgba(white, 0.12), overlay($bc, active));
}
@if $t == checked {
color: if($fc == $primary, white, on($fc));
background-color: $fc;
box-shadow: none !important;
}
@if $t == insensitive {
color: rgba($tc, 0.35);
background-color: $bc;
box-shadow: none !important;
}
@if $t == flat-normal {
color: $tc;
background-color: transparent;
box-shadow: none !important;
}
@if $t == flat-focus {
color: $tc;
background-color: overlay($bc, focus);
box-shadow: none !important;
}
@if $t == flat-hover {
color: $tc;
background-color: overlay($bc, hover);
}
@if $t == flat-active {
color: $tc;
background-color: overlay($bc, active);
box-shadow: none !important;
}
@if $t == flat-insensitive {
background-color: transparent;
color: rgba($tc, 0.35);
box-shadow: none !important;
}
}