Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

not aligned after customizing the size of input #5718

Merged
merged 1 commit into from
Apr 11, 2017

Conversation

leadream
Copy link
Contributor

@leadream leadream commented Apr 11, 2017

For some reasons I customized the size of . Now the default height of is 40px. But there's a problem in after doing that: the texts and icon inside it are not aligned vertically at center.

image

When I look into the code I found the height of ant-calendar-range-picker-input is 18px. I modified it to 100% and it aligned. I'm not sure if it can affect the other code.


因为某些原因我自定义了 的尺寸,现在它的默认高度是40px。但是当我使用 组件时,我发现了一个问题:输入框里面的文字和图标在垂直方向不能居中对齐。我看了一下 css 代码,发现里面的 ant-calendar-range-picker-input 高度是固定的18px,我把它改成100%就可以垂直居中对齐了。我不知道这个改动是否会影响其他代码。

First of all, thanks for your contribution! :-)

Please makes sure these boxes are checked before submitting your PR, thank you!

  • Make sure you propose PR to correct branch: bugfix for master, feature for latest active branch feature-x.x.
  • Make sure you follow antd's code convention.
  • Run npm run lint and fix those errors before submitting in order to keep consistent code style.
  • Rebase before creating a PR to keep commit history clear.
  • Add some descriptions and refer relative issues for you PR.

For some reasons I customized the size of <Input/>. Now the default height of <Input> is 40px. But there's a problem in <RangePicker/> after doing that: the texts and icon inside it are not aligned vertically at center.

When I look into the code I found the height of `ant-calendar-range-picker-input` is 18px. I modified it to 100% and it aligned. I'm not sure if it can affect the other code.

----------------------------------------
因为某些原因我自定义了 <Input/> 的尺寸,现在它的默认高度是40px。但是当我使用 <RangePicker/> 组件时,我发现了一个问题:输入框里面的文字和图标在垂直方向不能居中对齐。我看了一下 css 代码,发现里面的 `ant-calendar-range-picker-input` 高度是固定的18px,我把它改成100%就可以垂直居中对齐了。我不知道这个改动是否会影响其他代码。
@mention-bot
Copy link

@leadream, thanks for your PR! By analyzing the history of the files in this pull request, we identified @benjycui, @afc163 and @RaoHai to be potential reviewers.

@codecov
Copy link

codecov bot commented Apr 11, 2017

Codecov Report

Merging #5718 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff           @@
##           master   #5718   +/-   ##
======================================
  Coverage    86.7%   86.7%           
======================================
  Files         183     183           
  Lines        4513    4513           
  Branches     1308    1308           
======================================
  Hits         3913    3913           
  Misses        600     600

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3ca3c17...193b2b7. Read the comment docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants