UNPKG

@adobe/coral-spectrum

Version:

Coral Spectrum is a JavaScript library of Web Components following Spectrum design patterns.

711 lines (677 loc) 33.9 kB
/** * Copyright 2019 Adobe. All rights reserved. * This file is licensed to you under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. You may obtain a copy * of the License at http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS * OF ANY KIND, either express or implied. See the License for the specific language * governing permissions and limitations under the License. */ ._coral-ToggleSwitch { display: -ms-inline-flexbox; display: inline-flex; -ms-flex-align: start; align-items: flex-start; position: relative; min-height: 32px; max-width: 100%; margin-right: 16px; vertical-align: top; } ._coral-ToggleSwitch-input { margin: 0; box-sizing: border-box; padding: 0; position: absolute; width: 100%; height: 100%; top: 0; left: 0; opacity: .0001; z-index: 1; cursor: pointer; } ._coral-ToggleSwitch-input:checked + ._coral-ToggleSwitch-switch:before { transform: translateX(12px); } ._coral-ToggleSwitch-input:disabled, ._coral-ToggleSwitch-input[disabled] { cursor: default; } ._coral-ToggleSwitch-input.focus-ring + ._coral-ToggleSwitch-switch:after { margin: -2px; } ._coral-ToggleSwitch-label { margin: 0 10px; margin-top: 5px; font-size: 14px; line-height: 1.49; transition: color 160ms ease-in-out; } ._coral-ToggleSwitch-switch { display: inline-block; box-sizing: border-box; position: relative; width: 26px; margin: 9px 0; -ms-flex-positive: 0; flex-grow: 0; -ms-flex-negative: 0; flex-shrink: 0; vertical-align: middle; transition: background 130ms ease-in-out, border 130ms ease-in-out; height: 14px; left: 0; right: 0; border-radius: 7px; } ._coral-ToggleSwitch-switch:before { display: block; position: absolute; content: ""; box-sizing: border-box; } ._coral-ToggleSwitch-switch:before { transition: background 130ms ease-in-out, border 130ms ease-in-out, transform 130ms ease-in-out, box-shadow 130ms ease-in-out; width: 14px; height: 14px; top: 0; left: 0; border-width: 2px; border-radius: 7px; border-style: solid; } ._coral-ToggleSwitch-switch:after { border-radius: 11px; content: ''; display: block; position: absolute; left: 0; right: 0; bottom: 0; top: 0; margin: 0; transition: box-shadow 130ms ease-out, margin 130ms ease-out; } .coral--large ._coral-ToggleSwitch { min-height: 40px; margin-right: 20px; } .coral--large ._coral-ToggleSwitch-input:checked + ._coral-ToggleSwitch-switch:before { transform: translateX(18px); } .coral--large ._coral-ToggleSwitch-input.focus-ring + ._coral-ToggleSwitch-switch:after { margin: -2px; } .coral--large ._coral-ToggleSwitch-label { margin: 0 13px; margin-top: 6px; font-size: 17px; line-height: 1.49; transition: color 160ms ease-in-out; } .coral--large ._coral-ToggleSwitch-switch { width: 36px; margin: 11px 0; transition: background 130ms ease-in-out, border 130ms ease-in-out; height: 18px; border-radius: 9px; } .coral--large ._coral-ToggleSwitch-switch:before { transition: background 130ms ease-in-out, border 130ms ease-in-out, transform 130ms ease-in-out, box-shadow 130ms ease-in-out; width: 18px; height: 18px; border-width: 2px; border-radius: 9px; } .coral--large ._coral-ToggleSwitch-switch:after { border-radius: 13px; transition: box-shadow 130ms ease-out, margin 130ms ease-out; } .coral--light ._coral-ToggleSwitch-switch { background-color: rgb(225, 225, 225); } .coral--light ._coral-ToggleSwitch-switch:before { background-color: rgb(250, 250, 250); border-color: rgb(142, 142, 142); } .coral--light ._coral-ToggleSwitch-input ~ ._coral-ToggleSwitch-label { color: rgb(75, 75, 75); } .coral--light ._coral-ToggleSwitch-input:checked + ._coral-ToggleSwitch-switch { background-color: rgb(20, 115, 230); } .coral--light ._coral-ToggleSwitch-input:checked + ._coral-ToggleSwitch-switch:before { border-color: rgb(20, 115, 230); } .coral--light ._coral-ToggleSwitch:hover ._coral-ToggleSwitch-input + ._coral-ToggleSwitch-switch:before { border-color: rgb(110, 110, 110); box-shadow: none; } .coral--light ._coral-ToggleSwitch:hover ._coral-ToggleSwitch-input ~ ._coral-ToggleSwitch-label { color: rgb(44, 44, 44); } .coral--light ._coral-ToggleSwitch:hover ._coral-ToggleSwitch-input:checked:enabled + ._coral-ToggleSwitch-switch { background-color: rgb(13, 102, 208); } .coral--light ._coral-ToggleSwitch:hover ._coral-ToggleSwitch-input:checked:enabled + ._coral-ToggleSwitch-switch:before { border-color: rgb(13, 102, 208); } .coral--light ._coral-ToggleSwitch:active ._coral-ToggleSwitch-input + ._coral-ToggleSwitch-switch:before { border-color: rgb(75, 75, 75); } .coral--light ._coral-ToggleSwitch:active ._coral-ToggleSwitch-input ~ ._coral-ToggleSwitch-label { color: rgb(44, 44, 44); } .coral--light ._coral-ToggleSwitch:active ._coral-ToggleSwitch-input:checked:enabled + ._coral-ToggleSwitch-switch { background-color: rgb(9, 90, 186); } .coral--light ._coral-ToggleSwitch:active ._coral-ToggleSwitch-input:checked:enabled + ._coral-ToggleSwitch-switch:before { border-color: rgb(9, 90, 186); } .coral--light ._coral-ToggleSwitch ._coral-ToggleSwitch-input:disabled + ._coral-ToggleSwitch-switch { background-color: rgb(225, 225, 225); } .coral--light ._coral-ToggleSwitch ._coral-ToggleSwitch-input:disabled + ._coral-ToggleSwitch-switch:before { border-color: rgb(202, 202, 202); } .coral--light ._coral-ToggleSwitch ._coral-ToggleSwitch-input:disabled ~ ._coral-ToggleSwitch-label { color: rgb(179, 179, 179); } .coral--light ._coral-ToggleSwitch ._coral-ToggleSwitch-input:disabled:checked + ._coral-ToggleSwitch-switch { background-color: rgb(202, 202, 202); } .coral--light ._coral-ToggleSwitch ._coral-ToggleSwitch-input:disabled:checked + ._coral-ToggleSwitch-switch:before { border-color: rgb(202, 202, 202); } .coral--light ._coral-ToggleSwitch ._coral-ToggleSwitch-input:disabled:checked ~ ._coral-ToggleSwitch-label { color: rgb(179, 179, 179); } .coral--light ._coral-ToggleSwitch--quiet ._coral-ToggleSwitch-input:checked + ._coral-ToggleSwitch-switch { background-color: rgb(110, 110, 110); } .coral--light ._coral-ToggleSwitch--quiet ._coral-ToggleSwitch-input:checked + ._coral-ToggleSwitch-switch:before { border-color: rgb(110, 110, 110); } .coral--light ._coral-ToggleSwitch--quiet:hover ._coral-ToggleSwitch-input:checked:enabled + ._coral-ToggleSwitch-switch { background-color: rgb(75, 75, 75); } .coral--light ._coral-ToggleSwitch--quiet:hover ._coral-ToggleSwitch-input:checked:enabled + ._coral-ToggleSwitch-switch:before { border-color: rgb(75, 75, 75); } .coral--light ._coral-ToggleSwitch._coral-ToggleSwitch--quiet:active ._coral-ToggleSwitch-input:checked:enabled + ._coral-ToggleSwitch-switch { background-color: rgb(44, 44, 44); } .coral--light ._coral-ToggleSwitch._coral-ToggleSwitch--quiet:active ._coral-ToggleSwitch-input:checked:enabled + ._coral-ToggleSwitch-switch:before { border-color: rgb(44, 44, 44); } .coral--light ._coral-ToggleSwitch ._coral-ToggleSwitch-input.focus-ring + ._coral-ToggleSwitch-switch:after, .coral--light ._coral-ToggleSwitch:hover ._coral-ToggleSwitch-input.focus-ring + ._coral-ToggleSwitch-switch:after { box-shadow: 0 0 0 2px rgb(38, 128, 235); } .coral--light ._coral-ToggleSwitch ._coral-ToggleSwitch-input.focus-ring + ._coral-ToggleSwitch-switch:before, .coral--light ._coral-ToggleSwitch:hover ._coral-ToggleSwitch-input.focus-ring + ._coral-ToggleSwitch-switch:before { border-color: rgb(110, 110, 110); } .coral--light ._coral-ToggleSwitch ._coral-ToggleSwitch-input.focus-ring:checked + ._coral-ToggleSwitch-switch, .coral--light ._coral-ToggleSwitch:hover ._coral-ToggleSwitch-input.focus-ring:checked + ._coral-ToggleSwitch-switch { background-color: rgb(13, 102, 208); } .coral--light ._coral-ToggleSwitch ._coral-ToggleSwitch-input.focus-ring:checked + ._coral-ToggleSwitch-switch:before, .coral--light ._coral-ToggleSwitch:hover ._coral-ToggleSwitch-input.focus-ring:checked + ._coral-ToggleSwitch-switch:before { border-color: rgb(13, 102, 208); } .coral--light ._coral-ToggleSwitch--quiet ._coral-ToggleSwitch-input.focus-ring:checked + ._coral-ToggleSwitch-switch, .coral--light ._coral-ToggleSwitch--quiet:hover ._coral-ToggleSwitch-input.focus-ring:checked + ._coral-ToggleSwitch-switch { background-color: rgb(75, 75, 75); } .coral--light ._coral-ToggleSwitch--quiet ._coral-ToggleSwitch-input.focus-ring:checked + ._coral-ToggleSwitch-switch:before, .coral--light ._coral-ToggleSwitch--quiet:hover ._coral-ToggleSwitch-input.focus-ring:checked + ._coral-ToggleSwitch-switch:before { border-color: rgb(75, 75, 75); } .coral--light ._coral-ToggleSwitch--ab ._coral-ToggleSwitch-input:checked + ._coral-ToggleSwitch-switch { background-color: rgb(225, 225, 225); } .coral--light ._coral-ToggleSwitch--ab ._coral-ToggleSwitch-input:checked + ._coral-ToggleSwitch-switch:before { border-color: rgb(142, 142, 142); } .coral--light ._coral-ToggleSwitch--ab ._coral-ToggleSwitch-input.focus-ring:checked + ._coral-ToggleSwitch-switch { background-color: rgb(225, 225, 225); } .coral--light ._coral-ToggleSwitch--ab ._coral-ToggleSwitch-input.focus-ring:checked + ._coral-ToggleSwitch-switch:before { border-color: rgb(110, 110, 110); } .coral--light ._coral-ToggleSwitch--ab ._coral-ToggleSwitch-input:disabled:checked + ._coral-ToggleSwitch-switch { background-color: rgb(225, 225, 225); } .coral--light ._coral-ToggleSwitch--ab ._coral-ToggleSwitch-input:disabled + ._coral-ToggleSwitch-switch { background-color: rgb(225, 225, 225); } .coral--light ._coral-ToggleSwitch--ab ._coral-ToggleSwitch-input:disabled + ._coral-ToggleSwitch-switch:before { border-color: rgb(202, 202, 202); } .coral--light ._coral-ToggleSwitch--ab:hover ._coral-ToggleSwitch-input:checked:enabled + ._coral-ToggleSwitch-switch { background-color: rgb(225, 225, 225); } .coral--light ._coral-ToggleSwitch--ab:hover ._coral-ToggleSwitch-input:checked:enabled + ._coral-ToggleSwitch-switch:before { border-color: rgb(110, 110, 110); } .coral--light ._coral-ToggleSwitch--ab:active ._coral-ToggleSwitch-input:checked:enabled + ._coral-ToggleSwitch-switch { background-color: rgb(225, 225, 225); } .coral--light ._coral-ToggleSwitch--ab:active ._coral-ToggleSwitch-input:checked:enabled + ._coral-ToggleSwitch-switch:before { border-color: rgb(75, 75, 75); } .coral--lightest ._coral-ToggleSwitch-switch { background-color: rgb(234, 234, 234); } .coral--lightest ._coral-ToggleSwitch-switch:before { background-color: rgb(255, 255, 255); border-color: rgb(149, 149, 149); } .coral--lightest ._coral-ToggleSwitch-input ~ ._coral-ToggleSwitch-label { color: rgb(80, 80, 80); } .coral--lightest ._coral-ToggleSwitch-input:checked + ._coral-ToggleSwitch-switch { background-color: rgb(38, 128, 235); } .coral--lightest ._coral-ToggleSwitch-input:checked + ._coral-ToggleSwitch-switch:before { border-color: rgb(38, 128, 235); } .coral--lightest ._coral-ToggleSwitch:hover ._coral-ToggleSwitch-input + ._coral-ToggleSwitch-switch:before { border-color: rgb(116, 116, 116); box-shadow: none; } .coral--lightest ._coral-ToggleSwitch:hover ._coral-ToggleSwitch-input ~ ._coral-ToggleSwitch-label { color: rgb(50, 50, 50); } .coral--lightest ._coral-ToggleSwitch:hover ._coral-ToggleSwitch-input:checked:enabled + ._coral-ToggleSwitch-switch { background-color: rgb(20, 115, 230); } .coral--lightest ._coral-ToggleSwitch:hover ._coral-ToggleSwitch-input:checked:enabled + ._coral-ToggleSwitch-switch:before { border-color: rgb(20, 115, 230); } .coral--lightest ._coral-ToggleSwitch:active ._coral-ToggleSwitch-input + ._coral-ToggleSwitch-switch:before { border-color: rgb(80, 80, 80); } .coral--lightest ._coral-ToggleSwitch:active ._coral-ToggleSwitch-input ~ ._coral-ToggleSwitch-label { color: rgb(50, 50, 50); } .coral--lightest ._coral-ToggleSwitch:active ._coral-ToggleSwitch-input:checked:enabled + ._coral-ToggleSwitch-switch { background-color: rgb(13, 102, 208); } .coral--lightest ._coral-ToggleSwitch:active ._coral-ToggleSwitch-input:checked:enabled + ._coral-ToggleSwitch-switch:before { border-color: rgb(13, 102, 208); } .coral--lightest ._coral-ToggleSwitch ._coral-ToggleSwitch-input:disabled + ._coral-ToggleSwitch-switch { background-color: rgb(234, 234, 234); } .coral--lightest ._coral-ToggleSwitch ._coral-ToggleSwitch-input:disabled + ._coral-ToggleSwitch-switch:before { border-color: rgb(211, 211, 211); } .coral--lightest ._coral-ToggleSwitch ._coral-ToggleSwitch-input:disabled ~ ._coral-ToggleSwitch-label { color: rgb(188, 188, 188); } .coral--lightest ._coral-ToggleSwitch ._coral-ToggleSwitch-input:disabled:checked + ._coral-ToggleSwitch-switch { background-color: rgb(211, 211, 211); } .coral--lightest ._coral-ToggleSwitch ._coral-ToggleSwitch-input:disabled:checked + ._coral-ToggleSwitch-switch:before { border-color: rgb(211, 211, 211); } .coral--lightest ._coral-ToggleSwitch ._coral-ToggleSwitch-input:disabled:checked ~ ._coral-ToggleSwitch-label { color: rgb(188, 188, 188); } .coral--lightest ._coral-ToggleSwitch--quiet ._coral-ToggleSwitch-input:checked + ._coral-ToggleSwitch-switch { background-color: rgb(116, 116, 116); } .coral--lightest ._coral-ToggleSwitch--quiet ._coral-ToggleSwitch-input:checked + ._coral-ToggleSwitch-switch:before { border-color: rgb(116, 116, 116); } .coral--lightest ._coral-ToggleSwitch--quiet:hover ._coral-ToggleSwitch-input:checked:enabled + ._coral-ToggleSwitch-switch { background-color: rgb(80, 80, 80); } .coral--lightest ._coral-ToggleSwitch--quiet:hover ._coral-ToggleSwitch-input:checked:enabled + ._coral-ToggleSwitch-switch:before { border-color: rgb(80, 80, 80); } .coral--lightest ._coral-ToggleSwitch._coral-ToggleSwitch--quiet:active ._coral-ToggleSwitch-input:checked:enabled + ._coral-ToggleSwitch-switch { background-color: rgb(50, 50, 50); } .coral--lightest ._coral-ToggleSwitch._coral-ToggleSwitch--quiet:active ._coral-ToggleSwitch-input:checked:enabled + ._coral-ToggleSwitch-switch:before { border-color: rgb(50, 50, 50); } .coral--lightest ._coral-ToggleSwitch ._coral-ToggleSwitch-input.focus-ring + ._coral-ToggleSwitch-switch:after, .coral--lightest ._coral-ToggleSwitch:hover ._coral-ToggleSwitch-input.focus-ring + ._coral-ToggleSwitch-switch:after { box-shadow: 0 0 0 2px rgb(55, 142, 240); } .coral--lightest ._coral-ToggleSwitch ._coral-ToggleSwitch-input.focus-ring + ._coral-ToggleSwitch-switch:before, .coral--lightest ._coral-ToggleSwitch:hover ._coral-ToggleSwitch-input.focus-ring + ._coral-ToggleSwitch-switch:before { border-color: rgb(116, 116, 116); } .coral--lightest ._coral-ToggleSwitch ._coral-ToggleSwitch-input.focus-ring:checked + ._coral-ToggleSwitch-switch, .coral--lightest ._coral-ToggleSwitch:hover ._coral-ToggleSwitch-input.focus-ring:checked + ._coral-ToggleSwitch-switch { background-color: rgb(20, 115, 230); } .coral--lightest ._coral-ToggleSwitch ._coral-ToggleSwitch-input.focus-ring:checked + ._coral-ToggleSwitch-switch:before, .coral--lightest ._coral-ToggleSwitch:hover ._coral-ToggleSwitch-input.focus-ring:checked + ._coral-ToggleSwitch-switch:before { border-color: rgb(20, 115, 230); } .coral--lightest ._coral-ToggleSwitch--quiet ._coral-ToggleSwitch-input.focus-ring:checked + ._coral-ToggleSwitch-switch, .coral--lightest ._coral-ToggleSwitch--quiet:hover ._coral-ToggleSwitch-input.focus-ring:checked + ._coral-ToggleSwitch-switch { background-color: rgb(80, 80, 80); } .coral--lightest ._coral-ToggleSwitch--quiet ._coral-ToggleSwitch-input.focus-ring:checked + ._coral-ToggleSwitch-switch:before, .coral--lightest ._coral-ToggleSwitch--quiet:hover ._coral-ToggleSwitch-input.focus-ring:checked + ._coral-ToggleSwitch-switch:before { border-color: rgb(80, 80, 80); } .coral--lightest ._coral-ToggleSwitch--ab ._coral-ToggleSwitch-input:checked + ._coral-ToggleSwitch-switch { background-color: rgb(234, 234, 234); } .coral--lightest ._coral-ToggleSwitch--ab ._coral-ToggleSwitch-input:checked + ._coral-ToggleSwitch-switch:before { border-color: rgb(149, 149, 149); } .coral--lightest ._coral-ToggleSwitch--ab ._coral-ToggleSwitch-input.focus-ring:checked + ._coral-ToggleSwitch-switch { background-color: rgb(234, 234, 234); } .coral--lightest ._coral-ToggleSwitch--ab ._coral-ToggleSwitch-input.focus-ring:checked + ._coral-ToggleSwitch-switch:before { border-color: rgb(116, 116, 116); } .coral--lightest ._coral-ToggleSwitch--ab ._coral-ToggleSwitch-input:disabled:checked + ._coral-ToggleSwitch-switch { background-color: rgb(234, 234, 234); } .coral--lightest ._coral-ToggleSwitch--ab ._coral-ToggleSwitch-input:disabled + ._coral-ToggleSwitch-switch { background-color: rgb(234, 234, 234); } .coral--lightest ._coral-ToggleSwitch--ab ._coral-ToggleSwitch-input:disabled + ._coral-ToggleSwitch-switch:before { border-color: rgb(211, 211, 211); } .coral--lightest ._coral-ToggleSwitch--ab:hover ._coral-ToggleSwitch-input:checked:enabled + ._coral-ToggleSwitch-switch { background-color: rgb(234, 234, 234); } .coral--lightest ._coral-ToggleSwitch--ab:hover ._coral-ToggleSwitch-input:checked:enabled + ._coral-ToggleSwitch-switch:before { border-color: rgb(116, 116, 116); } .coral--lightest ._coral-ToggleSwitch--ab:active ._coral-ToggleSwitch-input:checked:enabled + ._coral-ToggleSwitch-switch { background-color: rgb(234, 234, 234); } .coral--lightest ._coral-ToggleSwitch--ab:active ._coral-ToggleSwitch-input:checked:enabled + ._coral-ToggleSwitch-switch:before { border-color: rgb(80, 80, 80); } .coral--dark ._coral-ToggleSwitch-switch { background-color: rgb(74, 74, 74); } .coral--dark ._coral-ToggleSwitch-switch:before { background-color: rgb(47, 47, 47); border-color: rgb(144, 144, 144); } .coral--dark ._coral-ToggleSwitch-input ~ ._coral-ToggleSwitch-label { color: rgb(227, 227, 227); } .coral--dark ._coral-ToggleSwitch-input:checked + ._coral-ToggleSwitch-switch { background-color: rgb(55, 142, 240); } .coral--dark ._coral-ToggleSwitch-input:checked + ._coral-ToggleSwitch-switch:before { border-color: rgb(55, 142, 240); } .coral--dark ._coral-ToggleSwitch:hover ._coral-ToggleSwitch-input + ._coral-ToggleSwitch-switch:before { border-color: rgb(185, 185, 185); box-shadow: none; } .coral--dark ._coral-ToggleSwitch:hover ._coral-ToggleSwitch-input ~ ._coral-ToggleSwitch-label { color: rgb(255, 255, 255); } .coral--dark ._coral-ToggleSwitch:hover ._coral-ToggleSwitch-input:checked:enabled + ._coral-ToggleSwitch-switch { background-color: rgb(75, 156, 245); } .coral--dark ._coral-ToggleSwitch:hover ._coral-ToggleSwitch-input:checked:enabled + ._coral-ToggleSwitch-switch:before { border-color: rgb(75, 156, 245); } .coral--dark ._coral-ToggleSwitch:active ._coral-ToggleSwitch-input + ._coral-ToggleSwitch-switch:before { border-color: rgb(227, 227, 227); } .coral--dark ._coral-ToggleSwitch:active ._coral-ToggleSwitch-input ~ ._coral-ToggleSwitch-label { color: rgb(255, 255, 255); } .coral--dark ._coral-ToggleSwitch:active ._coral-ToggleSwitch-input:checked:enabled + ._coral-ToggleSwitch-switch { background-color: rgb(90, 169, 250); } .coral--dark ._coral-ToggleSwitch:active ._coral-ToggleSwitch-input:checked:enabled + ._coral-ToggleSwitch-switch:before { border-color: rgb(90, 169, 250); } .coral--dark ._coral-ToggleSwitch ._coral-ToggleSwitch-input:disabled + ._coral-ToggleSwitch-switch { background-color: rgb(74, 74, 74); } .coral--dark ._coral-ToggleSwitch ._coral-ToggleSwitch-input:disabled + ._coral-ToggleSwitch-switch:before { border-color: rgb(90, 90, 90); } .coral--dark ._coral-ToggleSwitch ._coral-ToggleSwitch-input:disabled ~ ._coral-ToggleSwitch-label { color: rgb(110, 110, 110); } .coral--dark ._coral-ToggleSwitch ._coral-ToggleSwitch-input:disabled:checked + ._coral-ToggleSwitch-switch { background-color: rgb(90, 90, 90); } .coral--dark ._coral-ToggleSwitch ._coral-ToggleSwitch-input:disabled:checked + ._coral-ToggleSwitch-switch:before { border-color: rgb(90, 90, 90); } .coral--dark ._coral-ToggleSwitch ._coral-ToggleSwitch-input:disabled:checked ~ ._coral-ToggleSwitch-label { color: rgb(110, 110, 110); } .coral--dark ._coral-ToggleSwitch--quiet ._coral-ToggleSwitch-input:checked + ._coral-ToggleSwitch-switch { background-color: rgb(185, 185, 185); } .coral--dark ._coral-ToggleSwitch--quiet ._coral-ToggleSwitch-input:checked + ._coral-ToggleSwitch-switch:before { border-color: rgb(185, 185, 185); } .coral--dark ._coral-ToggleSwitch--quiet:hover ._coral-ToggleSwitch-input:checked:enabled + ._coral-ToggleSwitch-switch { background-color: rgb(227, 227, 227); } .coral--dark ._coral-ToggleSwitch--quiet:hover ._coral-ToggleSwitch-input:checked:enabled + ._coral-ToggleSwitch-switch:before { border-color: rgb(227, 227, 227); } .coral--dark ._coral-ToggleSwitch._coral-ToggleSwitch--quiet:active ._coral-ToggleSwitch-input:checked:enabled + ._coral-ToggleSwitch-switch { background-color: rgb(255, 255, 255); } .coral--dark ._coral-ToggleSwitch._coral-ToggleSwitch--quiet:active ._coral-ToggleSwitch-input:checked:enabled + ._coral-ToggleSwitch-switch:before { border-color: rgb(255, 255, 255); } .coral--dark ._coral-ToggleSwitch ._coral-ToggleSwitch-input.focus-ring + ._coral-ToggleSwitch-switch:after, .coral--dark ._coral-ToggleSwitch:hover ._coral-ToggleSwitch-input.focus-ring + ._coral-ToggleSwitch-switch:after { box-shadow: 0 0 0 2px rgb(38, 128, 235); } .coral--dark ._coral-ToggleSwitch ._coral-ToggleSwitch-input.focus-ring + ._coral-ToggleSwitch-switch:before, .coral--dark ._coral-ToggleSwitch:hover ._coral-ToggleSwitch-input.focus-ring + ._coral-ToggleSwitch-switch:before { border-color: rgb(185, 185, 185); } .coral--dark ._coral-ToggleSwitch ._coral-ToggleSwitch-input.focus-ring:checked + ._coral-ToggleSwitch-switch, .coral--dark ._coral-ToggleSwitch:hover ._coral-ToggleSwitch-input.focus-ring:checked + ._coral-ToggleSwitch-switch { background-color: rgb(75, 156, 245); } .coral--dark ._coral-ToggleSwitch ._coral-ToggleSwitch-input.focus-ring:checked + ._coral-ToggleSwitch-switch:before, .coral--dark ._coral-ToggleSwitch:hover ._coral-ToggleSwitch-input.focus-ring:checked + ._coral-ToggleSwitch-switch:before { border-color: rgb(75, 156, 245); } .coral--dark ._coral-ToggleSwitch--quiet ._coral-ToggleSwitch-input.focus-ring:checked + ._coral-ToggleSwitch-switch, .coral--dark ._coral-ToggleSwitch--quiet:hover ._coral-ToggleSwitch-input.focus-ring:checked + ._coral-ToggleSwitch-switch { background-color: rgb(227, 227, 227); } .coral--dark ._coral-ToggleSwitch--quiet ._coral-ToggleSwitch-input.focus-ring:checked + ._coral-ToggleSwitch-switch:before, .coral--dark ._coral-ToggleSwitch--quiet:hover ._coral-ToggleSwitch-input.focus-ring:checked + ._coral-ToggleSwitch-switch:before { border-color: rgb(227, 227, 227); } .coral--dark ._coral-ToggleSwitch--ab ._coral-ToggleSwitch-input:checked + ._coral-ToggleSwitch-switch { background-color: rgb(74, 74, 74); } .coral--dark ._coral-ToggleSwitch--ab ._coral-ToggleSwitch-input:checked + ._coral-ToggleSwitch-switch:before { border-color: rgb(144, 144, 144); } .coral--dark ._coral-ToggleSwitch--ab ._coral-ToggleSwitch-input.focus-ring:checked + ._coral-ToggleSwitch-switch { background-color: rgb(74, 74, 74); } .coral--dark ._coral-ToggleSwitch--ab ._coral-ToggleSwitch-input.focus-ring:checked + ._coral-ToggleSwitch-switch:before { border-color: rgb(185, 185, 185); } .coral--dark ._coral-ToggleSwitch--ab ._coral-ToggleSwitch-input:disabled:checked + ._coral-ToggleSwitch-switch { background-color: rgb(74, 74, 74); } .coral--dark ._coral-ToggleSwitch--ab ._coral-ToggleSwitch-input:disabled + ._coral-ToggleSwitch-switch { background-color: rgb(74, 74, 74); } .coral--dark ._coral-ToggleSwitch--ab ._coral-ToggleSwitch-input:disabled + ._coral-ToggleSwitch-switch:before { border-color: rgb(90, 90, 90); } .coral--dark ._coral-ToggleSwitch--ab:hover ._coral-ToggleSwitch-input:checked:enabled + ._coral-ToggleSwitch-switch { background-color: rgb(74, 74, 74); } .coral--dark ._coral-ToggleSwitch--ab:hover ._coral-ToggleSwitch-input:checked:enabled + ._coral-ToggleSwitch-switch:before { border-color: rgb(185, 185, 185); } .coral--dark ._coral-ToggleSwitch--ab:active ._coral-ToggleSwitch-input:checked:enabled + ._coral-ToggleSwitch-switch { background-color: rgb(74, 74, 74); } .coral--dark ._coral-ToggleSwitch--ab:active ._coral-ToggleSwitch-input:checked:enabled + ._coral-ToggleSwitch-switch:before { border-color: rgb(227, 227, 227); } .coral--darkest ._coral-ToggleSwitch-switch { background-color: rgb(57, 57, 57); } .coral--darkest ._coral-ToggleSwitch-switch:before { background-color: rgb(26, 26, 26); border-color: rgb(124, 124, 124); } .coral--darkest ._coral-ToggleSwitch-input ~ ._coral-ToggleSwitch-label { color: rgb(200, 200, 200); } .coral--darkest ._coral-ToggleSwitch-input:checked + ._coral-ToggleSwitch-switch { background-color: rgb(38, 128, 235); } .coral--darkest ._coral-ToggleSwitch-input:checked + ._coral-ToggleSwitch-switch:before { border-color: rgb(38, 128, 235); } .coral--darkest ._coral-ToggleSwitch:hover ._coral-ToggleSwitch-input + ._coral-ToggleSwitch-switch:before { border-color: rgb(162, 162, 162); box-shadow: none; } .coral--darkest ._coral-ToggleSwitch:hover ._coral-ToggleSwitch-input ~ ._coral-ToggleSwitch-label { color: rgb(239, 239, 239); } .coral--darkest ._coral-ToggleSwitch:hover ._coral-ToggleSwitch-input:checked:enabled + ._coral-ToggleSwitch-switch { background-color: rgb(55, 142, 240); } .coral--darkest ._coral-ToggleSwitch:hover ._coral-ToggleSwitch-input:checked:enabled + ._coral-ToggleSwitch-switch:before { border-color: rgb(55, 142, 240); } .coral--darkest ._coral-ToggleSwitch:active ._coral-ToggleSwitch-input + ._coral-ToggleSwitch-switch:before { border-color: rgb(200, 200, 200); } .coral--darkest ._coral-ToggleSwitch:active ._coral-ToggleSwitch-input ~ ._coral-ToggleSwitch-label { color: rgb(239, 239, 239); } .coral--darkest ._coral-ToggleSwitch:active ._coral-ToggleSwitch-input:checked:enabled + ._coral-ToggleSwitch-switch { background-color: rgb(75, 156, 245); } .coral--darkest ._coral-ToggleSwitch:active ._coral-ToggleSwitch-input:checked:enabled + ._coral-ToggleSwitch-switch:before { border-color: rgb(75, 156, 245); } .coral--darkest ._coral-ToggleSwitch ._coral-ToggleSwitch-input:disabled + ._coral-ToggleSwitch-switch { background-color: rgb(57, 57, 57); } .coral--darkest ._coral-ToggleSwitch ._coral-ToggleSwitch-input:disabled + ._coral-ToggleSwitch-switch:before { border-color: rgb(73, 73, 73); } .coral--darkest ._coral-ToggleSwitch ._coral-ToggleSwitch-input:disabled ~ ._coral-ToggleSwitch-label { color: rgb(92, 92, 92); } .coral--darkest ._coral-ToggleSwitch ._coral-ToggleSwitch-input:disabled:checked + ._coral-ToggleSwitch-switch { background-color: rgb(73, 73, 73); } .coral--darkest ._coral-ToggleSwitch ._coral-ToggleSwitch-input:disabled:checked + ._coral-ToggleSwitch-switch:before { border-color: rgb(73, 73, 73); } .coral--darkest ._coral-ToggleSwitch ._coral-ToggleSwitch-input:disabled:checked ~ ._coral-ToggleSwitch-label { color: rgb(92, 92, 92); } .coral--darkest ._coral-ToggleSwitch--quiet ._coral-ToggleSwitch-input:checked + ._coral-ToggleSwitch-switch { background-color: rgb(162, 162, 162); } .coral--darkest ._coral-ToggleSwitch--quiet ._coral-ToggleSwitch-input:checked + ._coral-ToggleSwitch-switch:before { border-color: rgb(162, 162, 162); } .coral--darkest ._coral-ToggleSwitch--quiet:hover ._coral-ToggleSwitch-input:checked:enabled + ._coral-ToggleSwitch-switch { background-color: rgb(200, 200, 200); } .coral--darkest ._coral-ToggleSwitch--quiet:hover ._coral-ToggleSwitch-input:checked:enabled + ._coral-ToggleSwitch-switch:before { border-color: rgb(200, 200, 200); } .coral--darkest ._coral-ToggleSwitch._coral-ToggleSwitch--quiet:active ._coral-ToggleSwitch-input:checked:enabled + ._coral-ToggleSwitch-switch { background-color: rgb(239, 239, 239); } .coral--darkest ._coral-ToggleSwitch._coral-ToggleSwitch--quiet:active ._coral-ToggleSwitch-input:checked:enabled + ._coral-ToggleSwitch-switch:before { border-color: rgb(239, 239, 239); } .coral--darkest ._coral-ToggleSwitch ._coral-ToggleSwitch-input.focus-ring + ._coral-ToggleSwitch-switch:after, .coral--darkest ._coral-ToggleSwitch:hover ._coral-ToggleSwitch-input.focus-ring + ._coral-ToggleSwitch-switch:after { box-shadow: 0 0 0 2px rgb(20, 115, 230); } .coral--darkest ._coral-ToggleSwitch ._coral-ToggleSwitch-input.focus-ring + ._coral-ToggleSwitch-switch:before, .coral--darkest ._coral-ToggleSwitch:hover ._coral-ToggleSwitch-input.focus-ring + ._coral-ToggleSwitch-switch:before { border-color: rgb(162, 162, 162); } .coral--darkest ._coral-ToggleSwitch ._coral-ToggleSwitch-input.focus-ring:checked + ._coral-ToggleSwitch-switch, .coral--darkest ._coral-ToggleSwitch:hover ._coral-ToggleSwitch-input.focus-ring:checked + ._coral-ToggleSwitch-switch { background-color: rgb(55, 142, 240); } .coral--darkest ._coral-ToggleSwitch ._coral-ToggleSwitch-input.focus-ring:checked + ._coral-ToggleSwitch-switch:before, .coral--darkest ._coral-ToggleSwitch:hover ._coral-ToggleSwitch-input.focus-ring:checked + ._coral-ToggleSwitch-switch:before { border-color: rgb(55, 142, 240); } .coral--darkest ._coral-ToggleSwitch--quiet ._coral-ToggleSwitch-input.focus-ring:checked + ._coral-ToggleSwitch-switch, .coral--darkest ._coral-ToggleSwitch--quiet:hover ._coral-ToggleSwitch-input.focus-ring:checked + ._coral-ToggleSwitch-switch { background-color: rgb(200, 200, 200); } .coral--darkest ._coral-ToggleSwitch--quiet ._coral-ToggleSwitch-input.focus-ring:checked + ._coral-ToggleSwitch-switch:before, .coral--darkest ._coral-ToggleSwitch--quiet:hover ._coral-ToggleSwitch-input.focus-ring:checked + ._coral-ToggleSwitch-switch:before { border-color: rgb(200, 200, 200); } .coral--darkest ._coral-ToggleSwitch--ab ._coral-ToggleSwitch-input:checked + ._coral-ToggleSwitch-switch { background-color: rgb(57, 57, 57); } .coral--darkest ._coral-ToggleSwitch--ab ._coral-ToggleSwitch-input:checked + ._coral-ToggleSwitch-switch:before { border-color: rgb(124, 124, 124); } .coral--darkest ._coral-ToggleSwitch--ab ._coral-ToggleSwitch-input.focus-ring:checked + ._coral-ToggleSwitch-switch { background-color: rgb(57, 57, 57); } .coral--darkest ._coral-ToggleSwitch--ab ._coral-ToggleSwitch-input.focus-ring:checked + ._coral-ToggleSwitch-switch:before { border-color: rgb(162, 162, 162); } .coral--darkest ._coral-ToggleSwitch--ab ._coral-ToggleSwitch-input:disabled:checked + ._coral-ToggleSwitch-switch { background-color: rgb(57, 57, 57); } .coral--darkest ._coral-ToggleSwitch--ab ._coral-ToggleSwitch-input:disabled + ._coral-ToggleSwitch-switch { background-color: rgb(57, 57, 57); } .coral--darkest ._coral-ToggleSwitch--ab ._coral-ToggleSwitch-input:disabled + ._coral-ToggleSwitch-switch:before { border-color: rgb(73, 73, 73); } .coral--darkest ._coral-ToggleSwitch--ab:hover ._coral-ToggleSwitch-input:checked:enabled + ._coral-ToggleSwitch-switch { background-color: rgb(57, 57, 57); } .coral--darkest ._coral-ToggleSwitch--ab:hover ._coral-ToggleSwitch-input:checked:enabled + ._coral-ToggleSwitch-switch:before { border-color: rgb(162, 162, 162); } .coral--darkest ._coral-ToggleSwitch--ab:active ._coral-ToggleSwitch-input:checked:enabled + ._coral-ToggleSwitch-switch { background-color: rgb(57, 57, 57); } .coral--darkest ._coral-ToggleSwitch--ab:active ._coral-ToggleSwitch-input:checked:enabled + ._coral-ToggleSwitch-switch:before { border-color: rgb(200, 200, 200); } ._coral-ToggleSwitch.is-readOnly { pointer-events: none; } ._coral-ToggleSwitch-label, .coral--large ._coral-ToggleSwitch-label { margin-top: 6px; }