Skip to content

Commit

Permalink
🐛 Fix Input not align with other components in Chrome
Browse files Browse the repository at this point in the history
close #17082
  • Loading branch information
afc163 committed Jun 14, 2019
1 parent edcd2ca commit 3606d15
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
4 changes: 3 additions & 1 deletion components/input/style/mixin.less
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@
height: @input-height-lg;
padding: @input-padding-vertical-lg @input-padding-horizontal-lg;
font-size: @font-size-lg;
line-height: @input-height-lg;
}

.input-sm() {
height: @input-height-sm;
padding: @input-padding-vertical-sm @input-padding-horizontal-sm;
line-height: @input-height-sm;
}

// input status
Expand Down Expand Up @@ -49,7 +51,7 @@
padding: @input-padding-vertical-base @input-padding-horizontal-base;
color: @input-color;
font-size: @font-size-base;
line-height: @line-height-base;
line-height: @input-height-base;
background-color: @input-bg;
background-image: none;
border: @border-width-base @border-style-base @input-border-color;
Expand Down
11 changes: 11 additions & 0 deletions components/time-picker/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -225,3 +225,14 @@
right: @control-padding-horizontal-sm - 1px;
}
}

// Fix cursor height in safari
// https://stackoverflow.com/q/3843408/3040605
// https://browserstrangeness.github.io/css_hacks.html#safari
@media not all and (min-resolution: 0.001dpcm) {
@supports (-webkit-appearance: none) and (stroke-color: transparent) {
.@{ant-prefix}-input {
line-height: @line-height-base;
}
}
}

1 comment on commit 3606d15

@zombieJ
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.