mirror of
https://git.disroot.org/eudaimon/Simplewaita.git
synced 2026-03-09 20:21:07 +00:00
81 lines
2 KiB
SCSS
81 lines
2 KiB
SCSS
// Drawing mixins
|
|
|
|
// generic drawing of more complex things
|
|
|
|
//
|
|
// Helper mixin for drawing visible focus rings
|
|
//
|
|
// If $target is specified, the focus ring is applied to the specified child element.
|
|
// If $outer is true, the focus ring extends outward. Otherwise, it extends inward.
|
|
// If $within is true, use focus-within instead of focus:focus-visible
|
|
//
|
|
|
|
//to allow some common mixins to know whether they've been called for a gtk3 or gtk4 widget, because there are some things that are different.
|
|
$gtk: 4;
|
|
|
|
|
|
@import "../common/relief.scss";
|
|
|
|
@mixin focus-ring($target: null, $width: 2px, $offset: -$width, $outer: false, $focus-state: 'focus:focus-visible', $fc: $focus_border_color) {
|
|
transition-property: outline, outline-width, outline-offset, outline-color;
|
|
transition-duration: 300ms;
|
|
animation-timing-function: ease-in-out;
|
|
& #{$target} {
|
|
outline: 0 solid transparent;
|
|
outline-offset: if($outer, $offset + 4px, $offset + $width + 4px);
|
|
}
|
|
|
|
&:#{$focus-state} #{$target} {
|
|
outline-color: transparent; //$fc;
|
|
outline-width: 0;//$width;
|
|
outline-offset: $offset;
|
|
}
|
|
}
|
|
|
|
@mixin _shadows($list...) {
|
|
//
|
|
// Helper mixin to stack up to box-shadows;
|
|
//
|
|
$shadows: null;
|
|
|
|
@each $shadow in $list {
|
|
@if $shadow!=none { $shadows: $shadows, $shadow; }
|
|
}
|
|
|
|
box-shadow: $shadows;
|
|
}
|
|
|
|
// entries
|
|
|
|
@import "../common/entry.scss";
|
|
|
|
// buttons
|
|
|
|
@import "../common/buttons.scss";
|
|
|
|
|
|
|
|
@mixin headerbar_fill($c:$headerbar_bg_color, $ov: none) {
|
|
//
|
|
// headerbar fill
|
|
//
|
|
// $c: base color
|
|
// $ov: a background layer for background shorthand (hence no commas!)
|
|
//
|
|
$gradient: linear-gradient(to top, darken($c, 2%), lighten($c, 1%));
|
|
|
|
@if $variant == 'dark' { $gradient: linear-gradient(to top, lighten($c, 4%), lighten($c, 6%)); }
|
|
|
|
@if $ov != none { background: $c $ov, $gradient; }
|
|
@else { background: $c $gradient; }
|
|
|
|
}
|
|
|
|
@import '../common/overshoot.scss';
|
|
|
|
|
|
/***************************
|
|
* Check and Radio buttons *
|
|
***************************/
|
|
|
|
@import "../common/checkradios.scss";
|