Skip to content

Commit 6d8ad57

Browse files
committed
chore(Bootstrap): Origo-fy Bootstrap checkboxes
1 parent c4b7236 commit 6d8ad57

File tree

2 files changed

+59
-2
lines changed

2 files changed

+59
-2
lines changed

packages/webui/src/client/styles/bootstrap-customize.scss

Lines changed: 55 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787

8888
/* Optional: Customize .focus-visible */
8989
:focus-visible {
90-
outline: $primary solid 2px;
90+
outline: var(--org-color-focus) solid 2px;
9191
}
9292

9393
.dropdown-menu {
@@ -159,6 +159,32 @@
159159
outline: none;
160160
}
161161

162+
.form-select,
163+
.form-control {
164+
--bs-border-radius: 2px;
165+
--bs-border-width: 0;
166+
box-shadow: var(--org-shadow-border, inset 0 0 0 1px rgba(108, 127, 147, .4));
167+
}
168+
169+
.form-control:focus,
170+
.form-select:focus {
171+
outline: 0;
172+
box-shadow: var(--org-shadow-focus, 0 0 0 2px #2bb9ff) !important;
173+
}
174+
175+
.form-control::placeholder,
176+
.form-select::placeholder {
177+
color: currentColor;
178+
opacity: .5;
179+
}
180+
181+
input[type="search"]::-webkit-search-decoration,
182+
input[type="search"]::-webkit-search-cancel-button,
183+
input[type="search"]::-webkit-search-results-button,
184+
input[type="search"]::-webkit-search-results-decoration {
185+
-webkit-appearance:none;
186+
}
187+
162188
.btn:disabled,
163189
.btn.disabled,
164190
fieldset:disabled .btn {
@@ -188,6 +214,34 @@ fieldset:disabled .btn::before {
188214
top: 0;
189215
}
190216

217+
.form-switch > .form-check-input[type="checkbox"]:focus {
218+
--bs-border-width: 0;
219+
}
220+
221+
*:not(.form-switch) > .form-check-input[type="checkbox"] {
222+
--bs-border-width: 0;
223+
border-radius: 2px;
224+
box-shadow: var(--org-shadow-border, inset 0 0 0 1px rgba(108, 127, 147, .4));
225+
color: var(--bs-primary);
226+
}
227+
228+
*:not(.form-switch) > .form-check-input[type="checkbox"]:checked {
229+
background-image: linear-gradient(0deg, transparent 38%, currentColor 0), linear-gradient(45deg, transparent 53%, currentColor 54%), linear-gradient(135deg, currentColor 37%, transparent 38%), linear-gradient(-135deg, currentColor 23%, transparent 0), linear-gradient(135deg, currentColor 33%, transparent 0), linear-gradient(45deg, currentcolor 28%, transparent 0), linear-gradient(-45deg, currentcolor 42%, transparent 0);
230+
background-position-x: 35%, 0, 100%, 100%, 100%, 100%, 100%;
231+
background-size: 5% 100%, 36% 100%, 64% 100%, 100%, 100%, 100%, 100%;
232+
background-color: var(--bs-white);
233+
}
234+
235+
.form-check-input[type="checkbox"]:active {
236+
filter: none;
237+
box-shadow: var(--org-shadow-focus, 0 0 0 2px #2bb9ff) !important;
238+
}
239+
240+
.form-check-input[type="checkbox"]:focus {
241+
outline: 0;
242+
box-shadow: var(--org-shadow-focus, 0 0 0 2px #2bb9ff) !important;
243+
}
244+
191245
.nav-tabs {
192246
--bs-nav-tabs-border-color: transparent;
193247
}

packages/webui/src/client/styles/settings.scss

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@
66

77
button {
88
align-self: start;
9-
margin: 0.25rem;
9+
}
10+
11+
button + button {
12+
margin-left: 0.25rem;
1013
}
1114
}
1215

0 commit comments

Comments
 (0)