- md5
- 2bb4dedaf31984f73b9b1254ae435432
- sha1
- babd31e85c2dd9b99783ed90df3d2378caf693c9
- sha256
- e0642297c19d99075fc31813f5282da2a62c6a775488a04820a081d19c119804
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
$off-background-colour: #d3d3d3;
$on-background-colour: #2f7d32;
$switcher-width: 62px;
$switcher-height: 28px;
.switcher {
position: relative;
width: 18rem;
height: 28px;
margin: 0;
}
.switcher input {
position: absolute;
top: 0;
left: 0;
z-index: 2;
width: $switcher-width;
height: $switcher-height;
margin: 0;
cursor: pointer;
opacity: 0;
[dir=rtl] & {
right: 0;
left: auto;
}
}
.switcher input:checked {
z-index: 1;
}
.switcher input:checked + label {
opacity: 1;
}
.switcher input:not(:checked) + label {
opacity: 0;
}
.switcher input:focus ~ .toggle-outside {
border-color: var(--focus);
box-shadow: 0 0 0 .2rem rgba(26, 70, 107, .25);
}
.switcher label {
position: absolute;
left: 0;
display: inline-block;
width: auto;
min-width: 6rem;
height: 100%;
margin-bottom: 0;
margin-left: 70px;
line-height: $switcher-height;
text-align: left;
transition: opacity .25s ease;
[dir=rtl] & {
right: 0;
left: auto;
margin-right: 70px;
margin-left: 0;
text-align: right;
}
}
.switcher .toggle-outside {
position: absolute;
left: 0;
box-sizing: border-box;
width: 58px;
height: 100%;
overflow: hidden;
background: $off-background-colour;
border: 1px solid rgba(0, 0, 0, .18);
transition: .2s ease all;
transform: translate3d(0, 0, 0);
[dir=rtl] & {
right: 0;
left: auto;
}
}
.switcher input ~ input:checked ~ .toggle-outside {
background: $on-background-colour;
}
.switcher .toggle-inside {
position: absolute;
left: 0;
width: ($switcher-width - 6) / 2;
height: $switcher-height;
background: #fff;
transition: .4s ease all;
}
.switcher input ~ input:checked ~ .toggle-outside .toggle-inside {
left: ($switcher-width / 2) - 1;
}
.switcher__legend {
padding: 5px 0;
margin-bottom: 1rem;
font-size: 1rem;
font-weight: 400;
}
The same content is in 2 releases, Joomla 4.0.0-beta6 to 4.0.0-beta7. See them all, or every version of this file.