mirror of
https://github.com/ant-design/ant-design.git
synced 2025-06-07 09:26:06 +08:00
feat: allow user customize table font size (#24714)
This commit is contained in:
parent
f36576f12d
commit
3d62c44325
@ -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;
|
||||
@table-font-size-md: @table-font-size;
|
||||
@table-font-size-sm: @table-font-size;
|
||||
// Sorter
|
||||
// Legacy: `table-header-sort-active-bg` is used for hover not real active
|
||||
@table-header-sort-active-bg: darken(@table-header-bg, 3%);
|
||||
|
@ -19,6 +19,7 @@
|
||||
position: relative;
|
||||
z-index: 0;
|
||||
clear: both;
|
||||
font-size: @table-font-size;
|
||||
background: @table-bg;
|
||||
border-radius: @border-radius-base;
|
||||
|
||||
|
@ -1,7 +1,9 @@
|
||||
@import './index';
|
||||
|
||||
.table-size(@size, @padding-vertical, @padding-horizontal) {
|
||||
.table-size(@size, @padding-vertical, @padding-horizontal, @font-size) {
|
||||
.@{table-prefix-cls}.@{table-prefix-cls}-@{size} {
|
||||
font-size: @font-size;
|
||||
|
||||
.@{table-prefix-cls}-title,
|
||||
.@{table-prefix-cls}-footer,
|
||||
.@{table-prefix-cls}-thead > tr > th,
|
||||
@ -48,12 +50,12 @@
|
||||
// ================================================================
|
||||
// = Middle =
|
||||
// ================================================================
|
||||
.table-size(~'middle', @table-padding-vertical-md, @table-padding-horizontal-md);
|
||||
.table-size(~'middle', @table-padding-vertical-md, @table-padding-horizontal-md, @table-font-size-md);
|
||||
|
||||
// ================================================================
|
||||
// = Small =
|
||||
// ================================================================
|
||||
.table-size(~'small', @table-padding-vertical-sm, @table-padding-horizontal-sm);
|
||||
.table-size(~'small', @table-padding-vertical-sm, @table-padding-horizontal-sm, @table-font-size-sm);
|
||||
|
||||
.@{table-prefix-cls}-small {
|
||||
.@{table-prefix-cls}-thead > tr > th {
|
||||
|
Loading…
Reference in New Issue
Block a user