Skip to content

Commit 3e23df4

Browse files
committed
Fixed the border on clear input buttons.
1 parent c25cfcf commit 3e23df4

File tree

3 files changed

+48
-42
lines changed

3 files changed

+48
-42
lines changed

src/date-input.css

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,9 @@
221221
right: -1px;
222222
cursor: pointer;
223223
outline: none;
224-
border: none;
224+
border-top: 1px solid #aaa;
225+
border-right: 1px solid #aaa;
226+
border-bottom: 1px solid #aaa;
225227
color: #777;
226228
width: 25%;
227229
height: auto;
@@ -232,19 +234,19 @@
232234
transition: background-color 0.25s ease-out;
233235
}
234236
.datetime-input.date .clear-button::before {
235-
position: absolute;
236-
left: -1em;
237-
top: 0;
238-
width: 0;
239-
height: 0;
240237
content: "";
241-
border-top: 2em solid #efefef;
242-
border-left: 1em solid transparent;
243-
transition: border 0.25s ease-out;
244-
}
245-
.datetime-input.date .clear-button:hover {
246-
background-color: #ddd;
247-
}
238+
position: absolute;
239+
left: -0.5em;
240+
top: -1px;
241+
width: 1em;
242+
height: 2em;
243+
background: #efefef;
244+
border-top: 1px solid #aaa;
245+
border-left: 1px solid #aaa;
246+
transition: background 0.25s ease-out;
247+
transform: skewX(25deg);
248+
}
249+
.datetime-input.date .clear-button:hover,
248250
.datetime-input.date .clear-button:hover::before {
249-
border-top-color: #ddd;
251+
background: #ddd;
250252
}

src/datetime-input.css

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,9 @@
331331
right: -1px;
332332
cursor: pointer;
333333
outline: none;
334-
border: none;
334+
border-top: 1px solid #aaa;
335+
border-right: 1px solid #aaa;
336+
border-bottom: 1px solid #aaa;
335337
color: #777;
336338
width: 25%;
337339
height: auto;
@@ -342,19 +344,19 @@
342344
transition: background-color 0.25s ease-out;
343345
}
344346
.datetime-input.datetime .clear-button::before {
345-
position: absolute;
346-
left: -1em;
347-
top: 0;
348-
width: 0;
349-
height: 0;
350347
content: "";
351-
border-top: 2em solid #efefef;
352-
border-left: 1em solid transparent;
353-
transition: border 0.25s ease-out;
354-
}
355-
.datetime-input.datetime .clear-button:hover {
356-
background-color: #ddd;
357-
}
348+
position: absolute;
349+
left: -0.5em;
350+
top: -1px;
351+
width: 1em;
352+
height: 2em;
353+
background: #efefef;
354+
border-top: 1px solid #aaa;
355+
border-left: 1px solid #aaa;
356+
transition: background 0.25s ease-out;
357+
transform: skewX(25deg);
358+
}
359+
.datetime-input.datetime .clear-button:hover,
358360
.datetime-input.datetime .clear-button:hover::before {
359-
border-top-color: #ddd;
361+
background: #ddd;
360362
}

src/time-input.css

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,9 @@
218218
right: -1px;
219219
cursor: pointer;
220220
outline: none;
221-
border: none;
221+
border-top: 1px solid #aaa;
222+
border-right: 1px solid #aaa;
223+
border-bottom: 1px solid #aaa;
222224
color: #777;
223225
width: 25%;
224226
height: auto;
@@ -229,19 +231,19 @@
229231
transition: background-color 0.25s ease-out;
230232
}
231233
.datetime-input.time .clear-button::before {
232-
position: absolute;
233-
left: -1em;
234-
top: 0;
235-
width: 0;
236-
height: 0;
237234
content: "";
238-
border-top: 2em solid #efefef;
239-
border-left: 1em solid transparent;
240-
transition: border 0.25s ease-out;
241-
}
242-
.datetime-input.time .clear-button:hover {
243-
background-color: #ddd;
244-
}
235+
position: absolute;
236+
left: -0.5em;
237+
top: -1px;
238+
width: 1em;
239+
height: 2em;
240+
background: #efefef;
241+
border-top: 1px solid #aaa;
242+
border-left: 1px solid #aaa;
243+
transition: background 0.25s ease-out;
244+
transform: skewX(25deg);
245+
}
246+
.datetime-input.time .clear-button:hover,
245247
.datetime-input.time .clear-button:hover::before {
246-
border-top-color: #ddd;
248+
background: #ddd;
247249
}

0 commit comments

Comments
 (0)