fix: change toggle style and improve responsiveness
This commit is contained in:
committed by
mrugesh
parent
c6b287b2b3
commit
e90eb66529
@@ -17,9 +17,11 @@
|
||||
background-color: var(--secondary-color);
|
||||
}
|
||||
|
||||
.btn .toggle-not-active,
|
||||
.btn .toggle-active {
|
||||
border-color: var(--secondary-color);
|
||||
.btn-group .btn.toggle-not-active,
|
||||
.btn-group .btn.toggle-active {
|
||||
border-color: var(--tertiary-color);
|
||||
padding-left: 30px;
|
||||
padding-right: 30px;
|
||||
}
|
||||
|
||||
.btn-group .btn-primary,
|
||||
@@ -27,3 +29,50 @@
|
||||
.btn-group .btn-primary:hover {
|
||||
border-color: var(--secondary-color);
|
||||
}
|
||||
|
||||
.btn.toggle-active > .tick,
|
||||
.btn.toggle-not-active > .tick {
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.btn:first-child > .tick {
|
||||
left: 9px;
|
||||
top: calc(50% - 8pt);
|
||||
}
|
||||
|
||||
.btn:last-child > .tick {
|
||||
right: 6px;
|
||||
top: calc(50% - 8pt);
|
||||
}
|
||||
|
||||
.btn-group .btn + .btn {
|
||||
margin-left: -2px;
|
||||
}
|
||||
|
||||
label.toggle-label {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
@media (max-width: 550px) {
|
||||
.btn:first-child > .tick {
|
||||
left: 6px;
|
||||
}
|
||||
|
||||
.btn:last-child > .tick {
|
||||
right: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 440px) {
|
||||
.btn-group .btn + .btn {
|
||||
margin-left: 0px;
|
||||
margin-top: -2px;
|
||||
}
|
||||
|
||||
.btn:first-child > .tick {
|
||||
left: auto;
|
||||
right: 5px;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user