// Drawing mixins

// generic drawing of more complex things

//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: 3;


@import "../common/relief.scss";

@function _widget_edge($c:$borders_edge) {
// outer highlight "used" on most widgets
  @if $c == none { @return none; }
  @else { @return 0 1px $c; }
}

@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
@function entry_focus_border($fc:$selected_bg_color) {
  //@if $variant == 'light' { @return $fc; }
  //@else { @return if($fc==$selected_bg_color, $selected_borders_color, darken($fc, 35%)); }
  @return $fc;
}

@function entry_focus_shadow($fc:$selected_bg_color) { @return inset 0 0 0 1px $fc; }

@import "../common/entry.scss";




// buttons

@import "../common/buttons.scss";


@mixin headerbar_fill($c:$headerbar_color, $hc:$top_hilight, $ov: none) {
//
// headerbar fill
//
// $c:  base color
// $hc: top highlight 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; }

  box-shadow: inset 0 1px $hc; // top highlight
}


@import '../common/overshoot.scss';


/***************************
 * Check and Radio buttons *
 ***************************/
 
@import "../common/checkradios.scss";



