132 lines
2.9 KiB
CSS
132 lines
2.9 KiB
CSS
.react-toggle {
|
|
display: inline-block;
|
|
position: relative;
|
|
cursor: pointer;
|
|
background-color: transparent;
|
|
border: 0;
|
|
padding: 0;
|
|
|
|
-webkit-touch-callout: none;
|
|
-webkit-user-select: none;
|
|
-khtml-user-select: none;
|
|
-moz-user-select: none;
|
|
-ms-user-select: none;
|
|
user-select: none;
|
|
|
|
-webkit-tap-highlight-color: rgba(0,0,0,0);
|
|
-webkit-tap-highlight-color: transparent;
|
|
}
|
|
|
|
.react-toggle-screenreader-only {
|
|
border: 0;
|
|
clip: rect(0 0 0 0);
|
|
height: 1px;
|
|
margin: -1px;
|
|
overflow: hidden;
|
|
padding: 0;
|
|
position: absolute;
|
|
width: 1px;
|
|
}
|
|
|
|
.react-toggle--disabled {
|
|
cursor: not-allowed;
|
|
opacity: 0.5;
|
|
-webkit-transition: opacity 0.25s;
|
|
transition: opacity 0.25s;
|
|
}
|
|
|
|
.react-toggle-track {
|
|
overflow: hidden;
|
|
width: 3.5rem;
|
|
height: 1.5rem;
|
|
padding: 0;
|
|
border-radius: 2rem;
|
|
background-color: #4E5A66;
|
|
-webkit-transition: all 0.2s ease;
|
|
-moz-transition: all 0.2s ease;
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
.react-toggle--checked .react-toggle-track {
|
|
background-color: #4E5A66;
|
|
}
|
|
|
|
.react-toggle-track-check {
|
|
position: absolute;
|
|
color: white;
|
|
width: 1rem;
|
|
line-height: 1.5rem;
|
|
font-size: 0.8rem;
|
|
left: 0.5rem;
|
|
opacity: 0;
|
|
-webkit-transition: opacity 0.25s ease;
|
|
-moz-transition: opacity 0.25s ease;
|
|
transition: opacity 0.25s ease;
|
|
}
|
|
|
|
.react-toggle--checked .react-toggle-track-check {
|
|
opacity: 1;
|
|
-webkit-transition: opacity 0.25s ease;
|
|
-moz-transition: opacity 0.25s ease;
|
|
transition: opacity 0.25s ease;
|
|
}
|
|
|
|
.react-toggle-track-x {
|
|
position: absolute;
|
|
color: white;
|
|
width: 1rem;
|
|
line-height: 1.5rem;
|
|
font-size: 0.8rem;
|
|
left: 1.7rem;
|
|
opacity: 1;
|
|
-webkit-transition: opacity 0.25s ease;
|
|
-moz-transition: opacity 0.25s ease;
|
|
transition: opacity 0.25s ease;
|
|
}
|
|
|
|
.react-toggle--checked .react-toggle-track-x {
|
|
opacity: 0;
|
|
}
|
|
|
|
.react-toggle-thumb {
|
|
transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1) 0ms;
|
|
position: absolute;
|
|
top: 1px;
|
|
left: 1px;
|
|
width: 1.35rem;
|
|
height: 1.35rem;
|
|
border-radius: 50%;
|
|
background-color: #FAFAFA;
|
|
|
|
-webkit-box-sizing: border-box;
|
|
-moz-box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
|
|
-webkit-transition: all 0.25s ease;
|
|
-moz-transition: all 0.25s ease;
|
|
transition: all 0.25s ease;
|
|
|
|
-webkit-box-shadow: 2px 0px 10px -1px rgba(0,0,0,0.4);
|
|
-moz-box-shadow: 2px 0px 102px -1px rgba(0,0,0,0.4);
|
|
box-shadow: 2px 0px 10px -1px rgba(0,0,0,0.4);
|
|
}
|
|
|
|
.react-toggle--checked .react-toggle-thumb {
|
|
left: 2.1rem;
|
|
-webkit-box-shadow: -2px 0px 10px -1px rgba(0,0,0,0.4);
|
|
-moz-box-shadow: -2px 0px 102px -1px rgba(0,0,0,0.4);
|
|
box-shadow: -2px 0px 10px -1px rgba(0,0,0,0.4);
|
|
}
|
|
|
|
.react-toggle--focus .react-toggle-thumb {
|
|
-webkit-box-shadow: 0px 0px 3px 2px #0F70D7;
|
|
-moz-box-shadow: 0px 0px 3px 2px #0F70D7;
|
|
box-shadow: 0px 0px 2px 3px #0F70D7;
|
|
}
|
|
|
|
.react-toggle:active:not(.react-toggle--disabled) .react-toggle-thumb {
|
|
-webkit-box-shadow: 0px 0px 5px 5px #0F70D7;
|
|
-moz-box-shadow: 0px 0px 5px 5px #0F70D7;
|
|
box-shadow: 0px 0px 5px 5px #0F70D7;
|
|
}
|