@mixin switch() {
  switch {
    font-size: 0;
    color: transparent;
    outline-offset: -4px;
    margin: 4px;
    border: 1px solid $borders;
    border-radius: 16px;
    background-color: $borders;

    &:checked {
      border-color: $selected_bg_color;
      background-color: $selected_bg_color;

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

    &:disabled {
      border-color: gtkshade($disabled_bg_color, 0.95);
      background-color: gtkshade($disabled_bg_color, 0.95);

      &:backdrop {
        border-color: gtkshade($unfocused_disabled_bg_color, 0.95);
        background-color: gtkshade($unfocused_disabled_bg_color, 0.95);
      }
    }

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

    slider {
      min-width: 14px;
      min-height: 14px;
      margin: 3px;
      border: none;
      border-radius: 100%;
      color: $fg_color;
      background-color: $base_color;
    }

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

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

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