Skip to content

Commit 3165532

Browse files
authored
Merge pull request #62 from Laravel-Backpack/fix-switch
fix switch
2 parents 0a1af54 + 7b83006 commit 3165532

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

resources/assets/css/coreui4.css

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414

1515
--cui-sidebar-1: #5c4fa9;
1616
--cui-sidebar-2: #2c2950;
17+
--bg-switch-checked-color: var(--cui-primary);
18+
1719
}
1820

1921
body {
@@ -320,3 +322,44 @@ html:not([dir=rtl]) .wrapper {
320322
#datatable_search_stack .input-icon-addon {
321323
display: none;
322324
}
325+
.switch-label .switch-slider::after {
326+
position: absolute;
327+
right: 1.5em;
328+
z-index: 1;
329+
margin-top: -1.8em;
330+
font-size: 8px;
331+
font-weight: 600;
332+
line-height: 1;
333+
text-align: center;
334+
text-transform: uppercase;
335+
content: attr(data-unchecked);
336+
transition: inherit;
337+
}
338+
339+
.switch-slider {
340+
position: relative;
341+
display: block;
342+
}
343+
344+
.switch-label.switch-sm .switch-slider {
345+
font-size: 8px;
346+
}
347+
348+
.switch-label.switch-sm .switch-input:checked ~ .switch-slider::after {
349+
transform: translateX(-4.3em);
350+
}
351+
.switch-label .switch-input:checked ~ .switch-slider::after {
352+
left: 1px;
353+
color: #fff;
354+
content: attr(data-checked);
355+
}
356+
357+
.switch-input.form-check-input {
358+
width: 3em;
359+
height: 1.5em;
360+
}
361+
362+
.form-switch.switch {
363+
width:3.5em;
364+
height: 1.8em;
365+
}

0 commit comments

Comments
 (0)