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

    &:checked {
      border-color: gtkalpha($selected_bg_color, 0.4);
      background-color: gtkalpha($selected_bg_color, 0.4);

      &:backdrop {
        border-color: gtkalpha($unfocused_selected_bg_color, 0.4);
        background-color: gtkalpha($unfocused_selected_bg_color, 0.4);
      }
    }

    &: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: 24px;
      min-height: 24px;
      margin: -3px;
      border: none;
      border-radius: 100%;
      color: $fg_color;
      background-color: gtkshade($borders, 1.4);
      box-shadow: 0 2px 3px 0 gtkalpha($dark_shadow, 0.15);
    }

    &:checked {
      slider {
        background-color: $selected_bg_color;
      }
      
      &:backdrop slider {
        background-color: $unfocused_selected_bg_color;
      }
    }

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

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

    &:backdrop slider {
      background-color: gtkshade($unfocused_base_color, 0.95);
    }
  }
}
