Skip to content

Commit

Permalink
Merge pull request #62 from Laravel-Backpack/fix-switch
Browse files Browse the repository at this point in the history
fix switch
  • Loading branch information
pxpm authored Dec 20, 2024
2 parents 0a1af54 + 7b83006 commit 3165532
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions resources/assets/css/coreui4.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@

--cui-sidebar-1: #5c4fa9;
--cui-sidebar-2: #2c2950;
--bg-switch-checked-color: var(--cui-primary);

}

body {
Expand Down Expand Up @@ -320,3 +322,44 @@ html:not([dir=rtl]) .wrapper {
#datatable_search_stack .input-icon-addon {
display: none;
}
.switch-label .switch-slider::after {
position: absolute;
right: 1.5em;
z-index: 1;
margin-top: -1.8em;
font-size: 8px;
font-weight: 600;
line-height: 1;
text-align: center;
text-transform: uppercase;
content: attr(data-unchecked);
transition: inherit;
}

.switch-slider {
position: relative;
display: block;
}

.switch-label.switch-sm .switch-slider {
font-size: 8px;
}

.switch-label.switch-sm .switch-input:checked ~ .switch-slider::after {
transform: translateX(-4.3em);
}
.switch-label .switch-input:checked ~ .switch-slider::after {
left: 1px;
color: #fff;
content: attr(data-checked);
}

.switch-input.form-check-input {
width: 3em;
height: 1.5em;
}

.form-switch.switch {
width:3.5em;
height: 1.8em;
}

0 comments on commit 3165532

Please sign in to comment.