@mixin switch() {
  switch {
    outline-offset: -4px;
    margin: 4px;
    color: $fg_color;
    border-radius: $roundness;
    border: 1px solid $borders;
    border-bottom-color: gtkmix($bg_color, $light_shadow, 0.7);
    border-right-color: gtkmix($bg_color, $light_shadow, 0.7);
    background-color: $bg_color;
    box-shadow: inset 1px 0 gtkshade($bg_color, 0.65), inset 0 1px gtkshade($bg_color, 0.65), inset -1px 0 gtkmix($bg_color, $light_shadow, 0.7), inset 0 -1px gtkmix($bg_color, $light_shadow, 0.7);

    &:checked {
      color: $selected_fg_color;
      background-color: $selected_bg_color;
    }

    &:disabled {
      color: $disabled_fg_color;
      border-color: $disabled_bg_color;
      background-color: $disabled_bg_color;
    }

    slider {
      margin: 0;
      border-radius: $roundness;
      color: $fg_color;
      border-color: $borders;
      background-color: $bg_color;
      background-image: linear-gradient(to bottom, gtkshade($bg_color, 1.05) 5%, $bg_color 20%, $bg_color 70%, gtkshade($bg_color, 0.95) 90%);
      box-shadow: inset -1px 0 gtkshade($bg_color, 0.65), inset 0 -1px gtkshade($bg_color, 0.65), inset 1px 0 gtkmix($bg_color, $light_shadow, 0.7), inset 0 1px gtkmix($bg_color, $light_shadow, 0.7);
    }

    &:disabled {
      slider {
        background-color: $disabled_bg_color;
      }
    }
  }
}
