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

fix(comp:*): the font size under seer theme is incorrect #1343

Merged
merged 1 commit into from
Dec 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/components/alert/demo/Description.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
title="Vue 是什么?"
description="Vue 是一套用于构建用户界面的渐进式框架。与其它大型框架不同的是,Vue 被设计为可以自底向上逐层应用。"
type="info"
closable
>
</IxAlert>
<IxAlert type="success">
Expand Down
8 changes: 3 additions & 5 deletions packages/components/alert/docs/Theme.zh.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
| 名称 | default | seer | 备注 |
| --- | --- | --- | --- |
| `@alert-height` | `var(--ix-height-md)` | - | - |
| `@alert-font-size` | `var(--ix-font-size-md)` | `var(--ix-font-size-sm)` | - |
| `@alert-border-radius` | `var(--ix-border-radius-md)` | `var(--ix-border-radius-sm)` | - |
| `@alert-icon-font-size` | `var(--ix-font-size-lg)` | - | - |
| `@alert-color` | `@text-color` | - | - |
| `@alert-color-secondary` | `@text-color-secondary` | - | - |
| `@alert-icon-color` | `var(--ix-text-color-secondary)` | - | - |
| `@alert-icon-color-hover` | `var(--ix-color-primary)` | - | - |
| `@alert-banner-border-color` | `var(--ix-border-color-secondary)` | - | - |
| `@alert-success-color` | `var(--ix-color-turquoise)` | `var(--ix-color-turquoise-d10)` | - |
| `@alert-info-color` | `var(--ix-color-primary)` | - | - |
| `@alert-warning-color` | `var(--ix-color-brown)` | `#a35f40` | - |
Expand All @@ -16,4 +15,3 @@
| `@alert-warning-background-color` | `#fffaf2` | - | - |
| `@alert-error-background-color` | `#fff2f2` | - | - |
| `@alert-offline-background-color` | `#f7f7f8` | - | - |
| `@alert-banner-border-color` | `var(--ix-border-color-secondary)` | - | - |
29 changes: 14 additions & 15 deletions packages/components/alert/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,12 @@

.@{alert-prefix} {
.reset-component-new();
.reset-font-size();

display: flex;
align-items: center;
min-height: @alert-height;
padding: 0 16px;
font-size: @alert-font-size;
line-height: calc(@alert-font-size + var(--ix-line-height-gutter));
color: @alert-color;
border: 1px solid transparent;
border-radius: @alert-border-radius;

Expand All @@ -30,45 +29,45 @@
&-close-icon {
cursor: pointer;
margin-left: 16px;
color: @alert-color-secondary;
color: @alert-icon-color;
transition: color var(--ix-transition-duration-fast);

&:hover {
color: @alert-color;
color: @alert-icon-color-hover;
}
}

&-icon,
&-close-icon {
font-size: @alert-icon-font-size;
font-size: var(--ix-font-size-icon);
}

&-content {
flex: 1;
min-width: 0;
padding: calc((@alert-height - @alert-font-size - var(--ix-line-height-gutter) - 2px) / 2) 0;
}

&-description {
.reset-font-size();
}

&-with-description {
.reset-font-size(calc(var(--ix-font-size) + 2px));

align-items: baseline;
font-size: calc(@alert-font-size + 2px);
line-height: calc(@alert-font-size + 2px + var(--ix-line-height-gutter));
padding-top: 6px;
padding-bottom: 6px;

.@{alert-prefix}-title {
margin-bottom: 4px;
}

.@{alert-prefix}-description {
font-size: @alert-font-size;
line-height: calc(@alert-font-size + var(--ix-line-height-gutter));
}
}

&-pagination {
margin-left: 16px;

&.@{pagination-prefix} {
color: @alert-color-secondary;
color: @alert-icon-color;
background-color: transparent;

.@{pagination-prefix}-item:hover,
Expand Down
10 changes: 3 additions & 7 deletions packages/components/alert/style/themes/default.variable.less
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
@alert-height: var(--ix-height-md);
@alert-font-size: var(--ix-font-size-md);
@alert-border-radius: var(--ix-border-radius-md);
@alert-icon-font-size: var(--ix-font-size-lg);

@alert-color: @text-color;
@alert-color-secondary: @text-color-secondary;
@alert-icon-color: var(--ix-text-color-secondary);
@alert-icon-color-hover: var(--ix-color-primary);
@alert-banner-border-color: var(--ix-border-color-secondary);

@alert-success-color: var(--ix-color-turquoise);
@alert-info-color: var(--ix-color-primary);
Expand All @@ -17,5 +15,3 @@
@alert-warning-background-color: #fffaf2;
@alert-error-background-color: #fff2f2;
@alert-offline-background-color: #f7f7f8;

@alert-banner-border-color: var(--ix-border-color-secondary);
1 change: 0 additions & 1 deletion packages/components/alert/style/themes/seer.variable.less
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
@import './default.variable.less';

@alert-border-radius: var(--ix-border-radius-sm);
@alert-font-size: var(--ix-font-size-sm);

@alert-success-color: var(--ix-color-turquoise-d10);
@alert-warning-color: #a35f40;
Expand Down
3 changes: 1 addition & 2 deletions packages/components/button/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

.@{button-prefix} {
.reset-component-new();
.reset-color(@button-color, @button-background-color);

position: relative;
display: inline-flex;
Expand All @@ -16,8 +17,6 @@
touch-action: manipulation;
outline: none;
text-decoration: none;
color: @button-color;
background-color: @button-background-color;
border: 1px solid @button-border-color;
border-radius: @button-border-radius;
transition: all var(--ix-transition-duration-fast) var(--ix-ease-in-out);
Expand Down
4 changes: 2 additions & 2 deletions packages/components/button/style/mixin.less
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.button-size(@height, @font-size, @min-width, @padding-horizontal) {
.reset-font-size(@font-size);

height: @height;
line-height: calc(@font-size + var(--ix-line-height-gutter));
font-size: @font-size;
min-width: @min-width;
padding: 0 @padding-horizontal;

Expand Down
1 change: 0 additions & 1 deletion packages/components/card/docs/Theme.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
| `@card-padding-lg` | `@spacing-xl` | - | - |
| `@card-border-width` | `@border-width-sm` | - | - |
| `@card-border-style` | `@border-style` | - | - |
| `@card-background-color` | `var(--ix-background-color)` | - | - |
| `@card-border-color` | `@color-graphite-l30` | - | - |
| `@card-border-color-hover` | `transparent` | - | - |
| `@card-border-radius` | `@border-radius-sm` | - | - |
Expand Down
5 changes: 2 additions & 3 deletions packages/components/card/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

.@{card-prefix} {
.reset-component-new();
.reset-color();

position: relative;
background-color: @card-background-color;
border: @card-border-width @card-border-style @card-border-color;
border-radius: @card-border-radius;
overflow: hidden;
Expand Down Expand Up @@ -202,8 +202,7 @@
}

.card-size(@font-size, @card-padding) {
font-size: @font-size;
line-height: calc(@font-size + var(--ix-line-height-gutter));
.reset-font-size(@font-size);

> .@{header-prefix} {
padding-left: @card-padding;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

@card-border-width: @border-width-sm;
@card-border-style: @border-style;
@card-background-color: var(--ix-background-color);
@card-border-color: @color-graphite-l30;
@card-border-color-hover: transparent;
@card-border-radius: @border-radius-sm;
Expand Down
1 change: 0 additions & 1 deletion packages/components/checkbox/docs/Theme.zh.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
| 名称 | default | seer | 备注 |
| --- | --- | --- | --- |
| `@checkbox-font-size` | `var(--ix-font-size-md)` | `var(--ix-font-size-sm)` | - |
| `@checkbox-color` | `var(--ix-text-color)` | - | - |
| `@checkbox-color-active` | `var(--ix-color-primary)` | - | - |
| `@checkbox-color-disabled` | `var(--ix-text-color-disabled)` | - | - |
Expand Down
5 changes: 3 additions & 2 deletions packages/components/checkbox/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@
}

.@{checkbox-prefix}-label {
font-size: @checkbox-font-size;
line-height: calc(@checkbox-font-size + var(--ix-line-height-gutter));
.reset-font-size();

padding: @checkbox-label-padding;
color: @checkbox-color;
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
@checkbox-font-size: var(--ix-font-size-md);
@checkbox-color: var(--ix-text-color);
@checkbox-color-active: var(--ix-color-primary);
@checkbox-color-disabled: var(--ix-text-color-disabled);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
@import './default.variable.less';

@checkbox-font-size: var(--ix-font-size-sm);
@checkbox-border-radius: var(--ix-border-radius-sm);

@checkbox-label-padding: 0 4px;
1 change: 0 additions & 1 deletion packages/components/collapse/docs/Theme.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@
| `@collapse-padding-horizontal-md` | `var(--ix-spacing-lg)` | - | - |
| `@collapse-border` | `1px solid var(--ix-border-color)` | - | - |
| `@collapse-border-radius` | `var(--ix-border-radius-md)` | `var(--ix-border-radius-sm)` | - |
| `@collapse-background-color` | `var(--ix-background-color)` | - | - |
| `@collapse-content-background-color` | `var(--ix-background-color-light)` | - | - |
8 changes: 3 additions & 5 deletions packages/components/collapse/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

.@{collapse-prefix} {
.reset-component-new();

background-color: @collapse-background-color;
.reset-color();

&-sm {
.collapse-size(@collapse-font-size-sm, @collapse-padding-horizontal-sm);
Expand Down Expand Up @@ -78,7 +77,7 @@

&-content {
border-color: transparent;
background-color: @collapse-background-color;
background-color: var(--ix-background-color);
}
}

Expand All @@ -94,8 +93,7 @@
}

.collapse-size(@font-size, @padding-horizontal) {
font-size: @font-size;
line-height: calc(@font-size + var(--ix-line-height-gutter));
.reset-font-size(@font-size);

.@{header-prefix} {
padding-left: @padding-horizontal;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,4 @@
@collapse-border: 1px solid var(--ix-border-color);
@collapse-border-radius: var(--ix-border-radius-md);

@collapse-background-color: var(--ix-background-color);

@collapse-content-background-color: var(--ix-background-color-light);
2 changes: 0 additions & 2 deletions packages/components/drawer/docs/Theme.zh.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
| 名称 | default | seer | 备注 |
| --- | --- | --- | --- |
| `@drawer-font-size` | `var(--ix-font-size-md)` | `var(--ix-font-size-sm)` | - |
| `@drawer-background-color` | `var(--ix-background-color)` | - | - |
| `@drawer-box-shadow-start` | `@shadow-right-lg` | - | - |
| `@drawer-box-shadow-end` | `@shadow-left-lg` | - | - |
| `@drawer-box-shadow-top` | `@shadow-bottom-lg` | - | - |
6 changes: 3 additions & 3 deletions packages/components/drawer/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
pointer-events: none;
width: 100%;
height: 100%;
font-size: @drawer-font-size;
line-height: calc(@drawer-font-size + var(--ix-line-height-gutter));

&-wrapper {
position: fixed;
Expand Down Expand Up @@ -38,11 +36,13 @@
}

&-content {
.reset-font-size();
.reset-color();

position: relative;
display: flex;
flex-direction: column;
height: 100%;
background-color: @drawer-background-color;
pointer-events: auto;
overflow: hidden;

Expand Down
3 changes: 0 additions & 3 deletions packages/components/drawer/style/themes/default.variable.less
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
@drawer-font-size: var(--ix-font-size-md);

@drawer-background-color: var(--ix-background-color);
@drawer-box-shadow-start: @shadow-right-lg;
@drawer-box-shadow-end: @shadow-left-lg;
@drawer-box-shadow-top: @shadow-bottom-lg;
2 changes: 0 additions & 2 deletions packages/components/drawer/style/themes/seer.variable.less
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
@import './default.variable.less';

@drawer-font-size: var(--ix-font-size-sm);
7 changes: 5 additions & 2 deletions packages/components/dropdown/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,20 @@
.@{dropdown-prefix} {
.reset-component-new();

background-color: @dropdown-background-color;
box-shadow: @dropdown-box-shadow;
border-radius: @dropdown-border-radius;
min-width: @dropdown-min-width;

&,
&-trigger {
.reset-font-size();

cursor: pointer;
}

&,
.@{overlay-prefix}-arrow {
color: @dropdown-background-color;
.reset-color();
}

.@{menu-prefix}-dropdown {
Expand Down
1 change: 0 additions & 1 deletion packages/components/empty/docs/Theme.zh.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
| 名称 | default | seer | 备注 |
| --- | --- | --- | --- |
| `@empty-color` | `var(--ix-text-color-info)` | - | - |
| `@empty-font-size` | `var(--ix-font-size-md)` | `var(--ix-font-size-sm)` | - |
| `@empty-description-color` | `var(--ix-text-color-disabled)` | - | - |
| `@empty-description-font-size` | `var(--ix-font-size-lg)` | - | - |
6 changes: 2 additions & 4 deletions packages/components/empty/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@

.@{empty-prefix} {
.reset-component-new();
.reset-font-size();

color: @empty-color;
font-size: @empty-font-size;
line-height: calc(@empty-font-size + var(--ix-line-height-gutter));
margin: var(--ix-spacing-xl) var(--ix-spacing-lg);
text-align: center;

Expand All @@ -24,8 +23,7 @@

&-description {
color: @empty-description-color;
font-size: @empty-description-font-size;
line-height: calc(@empty-description-font-size + var(--ix-line-height-gutter));
.reset-font-size(@empty-description-font-size);
}

&-content {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
@empty-color: var(--ix-text-color-info);
@empty-font-size: var(--ix-font-size-md);

@empty-description-color: var(--ix-text-color-disabled);
@empty-description-font-size: var(--ix-font-size-lg);
2 changes: 0 additions & 2 deletions packages/components/empty/style/themes/seer.variable.less
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
@import './default.variable.less';

@empty-font-size: var(--ix-font-size-sm);
2 changes: 0 additions & 2 deletions packages/components/header/docs/Theme.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,11 @@
| `@header-color-hover` | `var(--ix-color-primary-l10)` | - | - |
| `@header-color-active` | `var(--ix-color-primary-d10)` | - | - |
| `@header-color-disabled` | `var(--ix-text-color-disabled)` | - | - |
| `@header-background-color` | `var(--ix-background-color)` | - | - |
| `@header-bar-width` | `4px` | - | - |
| `@header-bar-background-color` | `var(--ix-color-primary)` | - | - |
| `@header-title-font-weight` | `var(--ix-font-weight-xl)` | - | - |
| `@header-sub-title-color` | `var(--ix-text-color-title-secondary)` | - | - |
| `@header-sub-title-font-size` | `var(--ix-font-size-md)` | - | - |
| `@header-suffix-color` | `var(--ix-text-color-title-secondary)` | - | - |
| `@header-description-color` | `var(--ix-text-color-info)` | - | - |
| `@header-description-font-size` | `var(--ix-font-size-md)` | `var(--ix-font-size-sm)` | - |
| `@header-icon-font-size` | `var(--ix-font-size-icon)` | - | - |
Loading