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

feat: #24670 allow user customize table font size with less variable #24714

Merged
merged 1 commit into from Jun 4, 2020

Conversation

morenyang
Copy link
Contributor

@morenyang morenyang commented Jun 3, 2020

[中文版模板 / Chinese template]

close #24670

🤔 This is a ...

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

🔗 Related issue link

#24670

💡 Background and solution

  • add variable @table-font-size, @table-font-size-md, @table-font-size-sm
  • to avoid impact user's style, these three variables are set to @font-size-base by default

Demo on local (set font-size to 16px, 14px, 12px temporary)
ezgif-2-595877b32398 (1)

📝 Changelog

Language Changelog
🇺🇸 English Add less variable @table-font-size, @table-font-size-md and @table-font-size-sm to customize the size of Table text.
🇨🇳 Chinese 新增 less 变量 @table-font-size@table-font-size-md@table-font-size-sm,用于自定义 Table 文字大小。

☑️ 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

@ant-design-bot
Copy link
Contributor

ant-design-bot commented Jun 3, 2020

@ant-design-bot
Copy link
Contributor

ant-design-bot commented Jun 3, 2020

@codesandbox-ci
Copy link

codesandbox-ci bot commented Jun 3, 2020

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 cdf0733:

Sandbox Source
antd reproduction template Configuration

@@ -574,6 +574,9 @@
@table-footer-bg: @background-color-light;
@table-footer-color: @heading-color;
@table-header-bg-sm: @table-header-bg;
@table-font-size: @font-size-base;
Copy link
Member

@xrkffgg xrkffgg Jun 3, 2020

Choose a reason for hiding this comment

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

关注下 紧凑模式 themes/compact.less 是不是需要调整。

@table-font-size-md @table-font-size-sm 都用 base 吗?

Copy link
Member

@xrkffgg xrkffgg Jun 3, 2020

Choose a reason for hiding this comment

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

我看你的 PR 的 Background and solution 写的是3个尺寸呀

Copy link
Contributor Author

@morenyang morenyang Jun 3, 2020

Choose a reason for hiding this comment

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

我觉得我们只是提供一个让用户能自定义的方式,如果直接改的话会影响已有的样式

@codecov
Copy link

codecov bot commented Jun 3, 2020

Codecov Report

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

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #24714   +/-   ##
=======================================
  Coverage   99.21%   99.21%           
=======================================
  Files         365      365           
  Lines        7278     7278           
  Branches     2031     2031           
=======================================
  Hits         7221     7221           
  Misses         57       57           

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 902141f...cdf0733. Read the comment docs.

@xrkffgg xrkffgg merged commit 3d62c44 into ant-design:master Jun 4, 2020
19 checks passed
07akioni pushed a commit to 07akioni/ant-design that referenced this pull request Jun 4, 2020
@ycjcl868 ycjcl868 mentioned this pull request Jun 5, 2020
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.

Add a less default variables that allows to control the table-font-size
3 participants