Skip to content

Commit e993289

Browse files
committed
feat: 🎸 beautify clear button
1 parent f0098aa commit e993289

3 files changed

Lines changed: 17 additions & 15 deletions

File tree

‎dist/select2-bootstrap4.css‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -149,15 +149,15 @@ form.was-validated select:valid ~ .select2-container--bootstrap4 .select2-select
149149
color: #6c757d; }
150150

151151
.select2-container--bootstrap4 .select2-selection__clear {
152-
width: 1.2em;
153-
height: 1.2em;
154-
line-height: 1.15em;
155-
padding-left: 0.3em;
156-
margin-top: 0.5em;
152+
width: 0.9em;
153+
height: 0.9em;
154+
line-height: 0.75em;
155+
padding-left: 0.15em;
156+
margin-top: 0.7em;
157157
border-radius: 100%;
158-
background-color: #6c757d;
158+
background-color: #c8c8c8;
159159
color: #f8f9fa;
160160
float: right;
161161
margin-right: 0.3em; }
162162
.select2-container--bootstrap4 .select2-selection__clear:hover {
163-
background-color: #343a40; }
163+
background-color: #afafaf; }

‎dist/select2-bootstrap4.min.css‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎src/layout.scss‎

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -127,20 +127,22 @@
127127

128128
// all clear button
129129
.select2-selection__clear {
130-
width: 1.2em;
131-
height: 1.2em;
132-
line-height: 1.15em;
133-
padding-left: 0.3em;
134-
margin-top: 0.5em;
130+
$bg: #c8c8c8;
131+
132+
width: 0.9em;
133+
height: 0.9em;
134+
line-height: 0.75em;
135+
padding-left: 0.15em;
136+
margin-top: 0.7em;
135137
border-radius: 100%;
136138

137-
background-color: $secondary;
139+
background-color: $bg;
138140
color: $light;
139141
float: right;
140142
margin-right: 0.3em;
141143

142144
&:hover {
143-
background-color: $dark;
145+
background-color: darken($bg, 10%);
144146
}
145147
}
146148
}

0 commit comments

Comments
 (0)