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

style: fix Button small size align when customize theme #24097

Merged
merged 1 commit into from
May 13, 2020

Conversation

afc163
Copy link
Member

@afc163 afc163 commented May 12, 2020

🤔 This is a ...

  • New feature
  • Bug fix
  • Site / document update
  • Component style update
  • TypeScript definition update
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Other (about what?)

🔗 Related issue link

close #24089

💡 Background and solution

dda45e4#r39119320

📝 Changelog

Language Changelog
🇺🇸 English Fix small Button align issue when customize theme.
🇨🇳 Chinese 修复定制主题时小号 Button 错位的问题。

☑️ Self Check before Merge

⚠️ Please check all items below before review. ⚠️

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • TypeScript definition is updated/provided or not needed
  • Changelog is provided or not needed

@afc163
Copy link
Member Author

afc163 commented May 12, 2020

dda45e4#r39119320 引起的,@AshoneA 看看移除掉有没有坑。

@ant-design-bot
Copy link
Contributor

ant-design-bot commented May 12, 2020

@codesandbox-ci
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit eb50231:

Sandbox Source
antd reproduction template Configuration

@codecov
Copy link

codecov bot commented May 12, 2020

Codecov Report

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

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #24097   +/-   ##
=======================================
  Coverage   98.82%   98.82%           
=======================================
  Files         364      364           
  Lines        7297     7297           
  Branches     2031     2031           
=======================================
  Hits         7211     7211           
  Misses         86       86           

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 64d151a...bd114b2. Read the comment docs.

@AshoneA
Copy link
Contributor

AshoneA commented May 12, 2020

有点问题,紧凑模式下 https://preview-24097-ant-design.surge.sh/components/button/#components-button-demo-size 单 icon 的情况下样式不对。

这个 bug 我看着像是 less 那 padding 算的有点问题

@afc163
Copy link
Member Author

afc163 commented May 13, 2020

紧凑模式下小号按钮已经很小了,默认的 14px * 1.66666 会超出高度,导致错位。这里调整为紧凑模式下 icon-only 的图标 size 和标准按钮 size 一致(按钮很很小了,这个差距意义不大)。

@@ -62,15 +62,15 @@
@text-selection-bg: @primary-color;
@font-variant-base: tabular-nums;
@font-feature-settings-base: 'tnum';
@font-size-base: 14px;
@font-size-base: 12px;
Copy link
Contributor

Choose a reason for hiding this comment

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

为啥要改默认的 font-size 和 line-height, 影响很大啊

Copy link
Member Author

Choose a reason for hiding this comment

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

改错了,已修正。

@afc163
Copy link
Member Author

afc163 commented May 13, 2020

/rebase

@AshoneA AshoneA merged commit f7e00f6 into master May 13, 2020
@AshoneA AshoneA deleted the fix-button-theme branch May 13, 2020 04:56
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.

.ant-btn-sm get wrong padding when changed 'font-size-base' and 'line-heigth-base'.
3 participants