Skip to content

Commit 8ddac4d

Browse files
committed
More select2 styling :(
1 parent a321ad9 commit 8ddac4d

File tree

1 file changed

+31
-10
lines changed

1 file changed

+31
-10
lines changed

resources/views/layouts/default.blade.php

Lines changed: 31 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -112,36 +112,46 @@
112112
.select2,
113113
.select2-choice,
114114
.select2-container,
115-
.select2-container--above,
116-
.select2-container--below,
117-
.select2-container--default,
118-
.select2-container--focus,
119-
.select2-hidden-accessible,
120115
.select2-results__option,
121116
.select2-search input,
122117
.select2-search--dropdown,
123118
.select2-search__field,
124119
.select2-selection .select2-selection--single,
125120
.select2-selection,
126-
.select2-selection,
127-
.select2-selection--single,
128121
.select2-selection--single,
122+
.select2-selection__rendered,
123+
input[type="date"],
124+
input[type="number"],
129125
input[type="text"],
126+
option:active,
127+
option[active],
130128
option[selected],
129+
select option,
131130
select,
132-
select::selection,
133131
textarea
134132
{
135133
background-color: var(--table-stripe-bg-alt) !important;
136134
color: var(--color-fg) !important;
137135
}
138136
137+
.select2-container--default.select2-container--focus .select2-selection--multiple,
138+
.select2-container--default .select2-search--dropdown .select2-search__field {
139+
border-color: hsl(from var(--main-theme-color) h s calc(l - 5)) !important;
140+
}
141+
139142
.select2-results__option[aria-selected=true] /** this handles the selected option */
140143
{
141144
background-color: hsl(from var(--main-theme-color) h s calc(l - 5)) !important;
142145
color: var(--color-fg) !important;
143146
}
144147
148+
input[type="text"]:focus,
149+
input[type="date"]:focus,
150+
input[type="number"]:focus
151+
{
152+
border-color: hsl(from var(--main-theme-color) h s calc(l - 5)) !important;
153+
}
154+
145155
/**
146156
Highlight the select2 on hover
147157
*/
@@ -150,6 +160,11 @@
150160
color: var(--color-fg) !important;
151161
}
152162
163+
.select2-results__option--highlighted[aria-selected=true] {
164+
background-color: hsl(from var(--main-theme-color) h s calc(l + 20)) !important;
165+
color: var(--color-fg) !important;
166+
}
167+
153168
.select2-selection__choice,
154169
.select2-container--default .select2-selection--multiple .select2-selection__choice
155170
{
@@ -161,6 +176,11 @@
161176
color: white !important;
162177
}
163178
179+
.select2-container--default {
180+
border-color: var(--box-header-bottom-border-color);
181+
}
182+
183+
164184
.select2-container--default .select2-selection--multiple .select2-selection__choice
165185
{
166186
background-color: hsl(from var(--main-theme-color) h s calc(l - 5)) !important;
@@ -173,6 +193,7 @@
173193
}
174194
175195
196+
176197
.search-highlight {
177198
background-color: var(--search-highlight);
178199
}
@@ -483,7 +504,7 @@
483504
{
484505
background-color: hsl(from var(--main-theme-color) h s calc(l - 5));
485506
border-color: hsl(from var(--main-theme-color) h s calc(l - 15));
486-
color: white;
507+
color: var(--color-fg) !important;
487508
488509
}
489510
@@ -678,7 +699,7 @@
678699
.callout-legend h4 a,
679700
.callout-legend h4 a:hover
680701
{
681-
color: var(--color-fg);
702+
color: var(--color-fg) !important;
682703
}
683704
684705

0 commit comments

Comments
 (0)