Oldiewaita/source/common/common_common.scss

101 lines
3.1 KiB
SCSS

@function gtkalpha($c,$a) {
@return unquote("alpha(#{$c},#{$a})");
}
// Optional compact sizes for buttons, headerbar and headerbar widgets
$_sizevariant: 'compact'; //either 'default', or compact otherwise
$_headerbar_height: if($_sizevariant=='default', 3em, 2.5em);
$_entry_height: if($_sizevariant=='default', 1.9em, 1.6em);
$_btn_pad: if($_sizevariant=='default', 4px 9px, 2px 4px);
$_hb_btn_pad: if($_sizevariant=='default', 6px, 5px);
$_img_btn_pad: if($_sizevariant=='default', 5px, 2px);
$_sel_menu_pad: if($_sizevariant=='default', 6px 10px, 4px 10px);
$_circ_btn_pad: if($_sizevariant=='default', 4px, 2px);
$_switch_margin: if($_sizevariant=='default', 10px, 7px);
$entry_radius: $button_radius;
$ease-out-quad: cubic-bezier(0.25, 0.46, 0.45, 0.94);
$asset_suffix: if($variant=='dark', '-dark', '');
$backdrop_transition: none;
$button_transition: none; //all 200ms $ease-out-quad;
//$button_radius: 0px;
//added by me:
$border_width: 2px;
$button_min_height: 1.6em;
$button_min_width: 1.6em;
$button_padding: $_btn_pad;
$button_border: $border_width solid;
$_slider_width: 10px;
$_slider_min_length: 40px;
$menu_radius: $button_radius;
$popover_radius: $window_radius;
%selected_items {
background-color: $selected_bg_color;
color: $selected_fg_color;
@at-root %nobg_selected_items, & {
color: $selected_fg_color;
@at-root %selected_items_disabled,
&:disabled { color: mix($selected_fg_color, $selected_bg_color, 50%); }
@at-root %selected_items_backdrop,
&:backdrop {
//Simplewaita does not like backdrop changes except for headerbar and window decoration
//however, some problems may arise if this is not applied.
color: $selected_fg_color;
background-color: $selected_bg_color;
//&:disabled { color: mix($backdrop_selected_fg_color, $selected_bg_color, 30%); }
}
}
}
entry, label {
&.error, &.error > text {
color: mix($error_color, $fg_color, 50%);
&:disabled { color: mix($error_color,$insensitive_fg_color,50%); }
}
&.warning, &.warning > text {
color: mix($warning_color, $fg_color, 50%);
&:disabled { color: mix($warning_color,$insensitive_fg_color,50%); }
}
&.success, &.success > text {
color: mix($success_color, $fg_color, 50%);
&:disabled { color: mix($success_color,$insensitive_fg_color,50%); }
}
&.accent, &.accent > text {
color: $selected_bg_color;
&:disabled { color: mix($selected_bg_color,$insensitive_fg_color,50%); }
}
}
%draggable {
background-image: radial-gradient(circle, gtkalpha(currentColor, 0.4) 15%, gtkalpha(currentColor, 0) 20%);
background-size: 0.3em 0.3em;
background-repeat: repeat;
background-clip: padding-box;
}
%disabled_pattern {
background-image: linear-gradient(45deg,
gtkalpha(currentColor, 0.5) 10%,
gtkalpha(currentColor, 0.0) 10%,
gtkalpha(currentColor, 0.0) 50%,
gtkalpha(currentColor, 0.5) 50%,
gtkalpha(currentColor, 0.5) 60%,
gtkalpha(currentColor, 0.0) 60% );
background-size: 0.6em 0.6em;
background-repeat: repeat;
background-position: center;
}