Skip to content

Commit 9c7af6a

Browse files
authored
fix: icon misalignment in chromium browsers (#203)
1 parent c83e63e commit 9c7af6a

File tree

1 file changed

+17
-29
lines changed

1 file changed

+17
-29
lines changed

src/scss/datepicker.scss

Lines changed: 17 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ $dp-tablet: 641px;
2424

2525
&--icon {
2626
display: inline-block;
27-
bottom: 0;
27+
top: 8px;
2828

2929
.date-picker__dialog {
3030
@media screen and (max-width: $dp-tablet) {
@@ -81,16 +81,12 @@ $dp-tablet: 641px;
8181
-webkit-font-smoothing: antialiased;
8282
-moz-osx-font-smoothing: grayscale;
8383
font-weight: 400;
84-
font-size: 16px;
8584
font-size: 1rem;
8685
line-height: 1.1875;
8786
box-sizing: border-box;
8887
display: inline-block;
8988
position: relative;
90-
margin-top: 0;
91-
margin-right: 0;
92-
margin-left: 0;
93-
margin-bottom: 0;
89+
margin: 0;
9490
padding: 8px 10px 7px;
9591
border: 2px solid transparent;
9692
border-radius: 0;
@@ -101,7 +97,7 @@ $dp-tablet: 641px;
10197
vertical-align: top;
10298
cursor: pointer;
10399
-webkit-appearance: none;
104-
@media screen and (min-width: $dp-tablet){
100+
@media screen and (min-width: $dp-tablet) {
105101
font-size: 19px;
106102
}
107103

@@ -117,11 +113,11 @@ $dp-tablet: 641px;
117113
}
118114

119115
&:hover {
120-
background-color: $dp-close-button-hover;
116+
background-color: $dp-close-button-hover;
121117
}
122118

123119
&:active {
124-
top: 2px;
120+
top: 2px;
125121
}
126122

127123
&:focus {
@@ -246,24 +242,17 @@ $dp-tablet: 641px;
246242
}
247243

248244
&__reveal__icon {
249-
height: 32px;
250-
width: 32px;
251-
color: white;
245+
display: inline-flex;
246+
align-items: center;
247+
justify-content: center;
252248
border: none;
249+
padding: 0;
253250
background-color: transparent;
254251

255252
svg {
256-
position: absolute;
257-
top: -7px;
258-
left: 0;
259-
height: 100%;
260-
width: 100%;
253+
height: 32px;
254+
width: 32px;
261255
fill: $dp-black;
262-
263-
/* IE10-11 */
264-
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
265-
top: 6px;
266-
}
267256
}
268257

269258
&:focus {
@@ -274,11 +263,10 @@ $dp-tablet: 641px;
274263
cursor: pointer;
275264
}
276265

277-
&:focus svg,
278-
&:hover svg {
279-
text-decoration: none;
266+
&:focus,
267+
&:hover {
280268
background: $dp-yellow;
281-
border-bottom: 4px solid $dp-black;
269+
box-shadow: 0 4px 0 $dp-black;
282270
}
283271
}
284272
}
@@ -349,11 +337,11 @@ $dp-tablet: 641px;
349337
}
350338

351339
.sr-only {
352-
clip: rect(0 0 0 0);
340+
clip: rect(0 0 0 0);
353341
clip-path: inset(50%);
354342
height: 1px;
355343
overflow: hidden;
356344
position: absolute;
357-
white-space: nowrap;
345+
white-space: nowrap;
358346
width: 1px;
359-
}
347+
}

0 commit comments

Comments
 (0)