@mixin switch() {
  switch {
    font-weight: bold;
    font-size: 6pt;
    outline-offset: -4px;
    margin: 4px;
    color: gtkalpha($fg_color, 0.6);
    border: 1px solid $borders;
    border-radius: 16px;
    background-color: $base_color;
    box-shadow: inset 0 10px #eeeeee, inset 0 2px gtkalpha($dark_shadow, 0.1);

    &:checked {
      color: $selected_fg_color;
      border-color: $borders;
      background-color: $borders;
      background-image: linear-gradient(to bottom, #2491ec 50%, #71b4ee);
      box-shadow: inset 0 10px #017fe9, inset 0 2px gtkalpha($dark_shadow, 0.1);

      &:backdrop {
        border-color: $unfocused_borders;
        background-color: $unfocused_borders;
      }
    }

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

      &:backdrop {
        border-color: $unfocused_disabled_bg_color;
        background-color: $unfocused_disabled_bg_color;
      }
    }

    &:backdrop {
      border-color: $unfocused_borders;
      background-color: $unfocused_borders;
    }

    slider {
      min-width: 20px;
      min-height: 20px;
      margin: 0;
      border: none;
      border-radius: 100%;
      color: $fg_color;
      box-shadow: 0 2px 2px 1px gtkalpha($dark_shadow, 0.09);
      background-color: $base_color;
      background-image: linear-gradient(to bottom, gtkshade($base_color, 0.9), $base_color);
    }

    &:disabled {
      slider {
        background-color: $disabled_base_color;
        box-shadow: inset 0 1px transparent;
      }

      &:backdrop slider {
        background-color: $unfocused_disabled_base_color;
      }
    }

    &:backdrop slider {
      background-color: $unfocused_base_color;
      box-shadow: inset 0 1px transparent;
    }
  }
}
