Skip to content

Commit

Permalink
refactor: semantic font size variables
Browse files Browse the repository at this point in the history
  • Loading branch information
guoyunhe committed Mar 3, 2024
1 parent 784eff5 commit b63cdce
Show file tree
Hide file tree
Showing 45 changed files with 91 additions and 77 deletions.
6 changes: 3 additions & 3 deletions src/components/action-sheet/action-sheet.less
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
display: flex;
justify-content: center;
color: var(--adm-color-weak);
font-size: var(--adm-font-size-7);
font-size: var(--adm-font-size-large);
padding: 18px 12px;
border-bottom: 1px solid var(--adm-color-border);
}
Expand Down Expand Up @@ -40,10 +40,10 @@
}
&-name {
color: var(--adm-color-text);
font-size: var(--adm-font-size-10);
font-size: var(--adm-font-size-huge);
}
&-description {
font-size: var(--adm-font-size-6);
font-size: var(--adm-font-size-main);
color: var(--adm-color-weak);
padding-top: 4px;
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/badge/badge.less
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
box-sizing: border-box;
min-width: 8px;
padding: 1px 4px;
font-size: var(--adm-font-size-1);
font-size: var(--adm-font-size-tiny);
line-height: 12px;
white-space: nowrap;
font-weight: normal;
Expand Down
6 changes: 3 additions & 3 deletions src/components/button/button.less
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
height: auto;
padding: 7px 12px;
margin: 0;
font-size: var(--adm-font-size-9);
font-size: var(--adm-font-size-huge);
line-height: 1.4;
text-align: center;
border: var(--border-width) var(--border-style) var(--border-color);
Expand Down Expand Up @@ -117,12 +117,12 @@
&&-small {
padding-top: 3px;
padding-bottom: 3px;
font-size: var(--adm-font-size-7);
font-size: var(--adm-font-size-large);
}
&&-large {
padding-top: 11px;
padding-bottom: 11px;
font-size: var(--adm-font-size-10);
font-size: var(--adm-font-size-huge);
}
&&-shape-rounded {
--border-radius: 1000px;
Expand Down
8 changes: 4 additions & 4 deletions src/components/calendar-picker-view/calendar-picker-view.less
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
.adm-calendar-picker-popup {
& &-title {
flex: auto;
font-size: var(--adm-font-size-10);
font-size: var(--adm-font-size-huge);
}

& &-header {
Expand Down Expand Up @@ -115,13 +115,13 @@
& &-date {
flex: none;
line-height: 22px;
font-size: var(--adm-font-size-8);
font-size: var(--adm-font-size-large);
}

& &-top,
& &-bottom {
flex: none;
font-size: var(--adm-font-size-1);
font-size: var(--adm-font-size-tiny);
height: 14px;
line-height: 14px;
color: var(--adm-color-weak);
Expand All @@ -136,7 +136,7 @@
border-bottom: solid 1px var(--adm-color-border);
height: 45px;
box-sizing: border-box;
font-size: var(--adm-font-size-6);
font-size: var(--adm-font-size-main);
padding: 0 8px;

& &-cell {
Expand Down
8 changes: 4 additions & 4 deletions src/components/calendar/calendar.less
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
}
}
.adm-calendar-title {
font-size: var(--adm-font-size-10);
font-size: var(--adm-font-size-huge);
flex: auto;
text-align: center;
}
Expand Down Expand Up @@ -82,11 +82,11 @@
justify-content: flex-end;
& &-top {
flex: none;
font-size: var(--adm-font-size-10);
font-size: var(--adm-font-size-huge);
}
& &-bottom {
flex: none;
font-size: var(--adm-font-size-4);
font-size: var(--adm-font-size-small);
height: 12px;
line-height: 12px;
color: var(--adm-color-weak);
Expand All @@ -101,7 +101,7 @@
border-bottom: solid 1px var(--adm-color-border);
height: 45px;
box-sizing: border-box;
font-size: var(--adm-font-size-7);
font-size: var(--adm-font-size-large);
padding: 0 8px;
& &-cell {
flex: 1;
Expand Down
2 changes: 1 addition & 1 deletion src/components/capsule-tabs/capsule-tabs.less
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
margin: 0 auto;
border-radius: 20px;
cursor: pointer;
font-size: var(--adm-font-size-7);
font-size: var(--adm-font-size-large);
text-align: center;
white-space: nowrap;
background-color: var(--adm-color-fill-content);
Expand Down
2 changes: 1 addition & 1 deletion src/components/card/card.less
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
border-bottom: solid 0.5px var(--adm-color-border);
}
&-title {
font-size: var(--adm-font-size-7);
font-size: var(--adm-font-size-large);
line-height: 1.4;
font-weight: bold;
}
Expand Down
4 changes: 2 additions & 2 deletions src/components/cascader-view/cascader-view.less
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

&-tabs {
&.adm-tabs {
--title-font-size: var(--adm-font-size-6);
--title-font-size: var(--adm-font-size-main);
--content-padding: none;
}
}
Expand All @@ -28,7 +28,7 @@
}

&-item {
font-size: var(--adm-font-size-6);
font-size: var(--adm-font-size-main);

&-active {
color: var(--adm-color-primary);
Expand Down
4 changes: 2 additions & 2 deletions src/components/cascader/cascader.less
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
align-items: center;
padding: 6px 8px;
&-button {
font-size: var(--adm-font-size-7);
font-size: var(--adm-font-size-large);
display: inline-block;
padding: 4px 4px;
}
&-title {
padding: 4px 4px;
font-size: var(--adm-font-size-7);
font-size: var(--adm-font-size-large);
color: var(--adm-color-text);
text-align: center;
flex: 1;
Expand Down
2 changes: 1 addition & 1 deletion src/components/check-list/check-list.less
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.adm-check-list-item {
&-extra {
font-size: var(--adm-font-size-10);
font-size: var(--adm-font-size-huge);
line-height: 1;
color: var(--adm-color-primary);
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/checkbox/checkbox.less
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

.@{class-prefix-checkbox} {
--icon-size: 22px;
--font-size: var(--adm-font-size-9);
--font-size: var(--adm-font-size-huge);
--gap: 8px;
display: inline-flex;
vertical-align: text-bottom;
Expand Down
8 changes: 4 additions & 4 deletions src/components/dialog/dialog.less
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
.@{class-prefix-dialog}-body {
width: 100%;
max-height: 70vh;
font-size: var(--adm-font-size-6);
font-size: var(--adm-font-size-main);
overflow: hidden;

display: flex;
Expand Down Expand Up @@ -41,7 +41,7 @@
margin-bottom: 8px;
padding: 0 12px;
font-weight: bold;
font-size: var(--adm-font-size-10);
font-size: var(--adm-font-size-huge);
line-height: 25px;
text-align: center;
}
Expand All @@ -50,7 +50,7 @@
max-height: 70vh;
overflow-x: hidden;
overflow-y: auto;
font-size: var(--adm-font-size-7);
font-size: var(--adm-font-size-large);
line-height: 1.4;
color: var(--adm-color-text);
&-empty {
Expand All @@ -69,7 +69,7 @@
}
> .adm-dialog-button {
padding: 10px;
font-size: var(--adm-font-size-10);
font-size: var(--adm-font-size-huge);
line-height: 25px;
border-radius: 0;
&-bold {
Expand Down
2 changes: 1 addition & 1 deletion src/components/empty/empty.less
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

&-description {
margin-top: 8px;
font-size: var(--adm-font-size-6);
font-size: var(--adm-font-size-main);
color: var(--adm-color-light);
}
}
4 changes: 2 additions & 2 deletions src/components/error-block/error-block.less
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@
}

&-description {
font-size: var(--adm-font-size-4);
font-size: var(--adm-font-size-small);
color: var(--adm-color-weak);
line-height: 1.4;
margin-top: 12px;
&-title {
font-size: var(--adm-font-size-7);
font-size: var(--adm-font-size-large);
}
&-subtitle {
margin-top: 8px;
Expand Down
4 changes: 2 additions & 2 deletions src/components/error-block/error-block.patch.less
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
}

&-description {
font-size: var(--adm-font-size-4);
font-size: var(--adm-font-size-small);
&-title {
font-size: var(--adm-font-size-7);
font-size: var(--adm-font-size-large);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/components/form/form-item.less
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@

&&-vertical {
.adm-form-item-label {
font-size: var(--adm-font-size-7);
font-size: var(--adm-font-size-large);
margin-bottom: 4px;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/image-uploader/image-uploader.less
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
&-mask-message {
display: inline-block;
padding: 6px 4px;
font-size: var(--adm-font-size-4);
font-size: var(--adm-font-size-small);
}

&-image {
Expand Down
2 changes: 1 addition & 1 deletion src/components/image-viewer/image-viewer.less
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,6 @@
top: 12px;
transform: translateX(-50%);
color: var(--adm-color-border);
font-size: var(--adm-font-size-6);
font-size: var(--adm-font-size-main);
}
}
2 changes: 1 addition & 1 deletion src/components/index-bar/index-bar.less
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
z-index: 910;
overflow: visible;
color: var(--adm-color-weak);
font-size: var(--adm-font-size-4);
font-size: var(--adm-font-size-small);
user-select: none;
touch-action: none;

Expand Down
4 changes: 2 additions & 2 deletions src/components/input/input.less
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@class-prefix-input: ~'adm-input';

.@{class-prefix-input} {
--font-size: var(--adm-font-size-9);
--font-size: var(--adm-font-size-huge);
--color: var(--adm-color-text);
--placeholder-color: var(--adm-color-light);
--text-align: left;
Expand Down Expand Up @@ -105,6 +105,6 @@
cursor: pointer;
.antd-mobile-icon {
display: block;
font-size: var(--adm-font-size-7);
font-size: var(--adm-font-size-large);
}
}
2 changes: 1 addition & 1 deletion src/components/jumbo-tabs/jumbo-tabs.less
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
margin: 0 auto;
padding: 12px 0;
cursor: pointer;
font-size: var(--adm-font-size-9);
font-size: var(--adm-font-size-huge);
white-space: nowrap;
&-title {
line-height: 24px;
Expand Down
6 changes: 3 additions & 3 deletions src/components/list/list.less
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.adm-list {
--header-font-size: var(--adm-font-size-7);
--header-font-size: var(--adm-font-size-large);
--prefix-width: 'auto';
--prefix-padding-right: 12px;
--align-items: center;
Expand All @@ -9,7 +9,7 @@
--border-bottom: solid 1px var(--adm-color-border);
--padding-left: 12px;
--padding-right: 12px;
--font-size: var(--adm-font-size-9);
--font-size: var(--adm-font-size-huge);
--extra-max-width: 70%;

&-header {
Expand Down Expand Up @@ -71,7 +71,7 @@
&-extra {
flex: none;
padding-left: 12px;
font-size: var(--adm-font-size-7);
font-size: var(--adm-font-size-large);
color: var(--adm-color-weak);
max-width: var(--extra-max-width);
}
Expand Down
8 changes: 4 additions & 4 deletions src/components/modal/modal.less
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
.@{class-prefix-modal}-body {
width: 100%;
max-height: 70vh;
font-size: var(--adm-font-size-6);
font-size: var(--adm-font-size-main);
overflow: hidden;

display: flex;
Expand Down Expand Up @@ -42,7 +42,7 @@
margin-bottom: 8px;
padding: 0 12px;
font-weight: bold;
font-size: var(--adm-font-size-10);
font-size: var(--adm-font-size-huge);
line-height: 25px;
text-align: center;
}
Expand All @@ -51,7 +51,7 @@
max-height: 70vh;
overflow-x: hidden;
overflow-y: auto;
font-size: var(--adm-font-size-7);
font-size: var(--adm-font-size-large);
line-height: 1.4;
color: var(--adm-color-text);
}
Expand All @@ -67,7 +67,7 @@
--gap-vertical: 20px;
}
.adm-modal-button {
font-size: var(--adm-font-size-10);
font-size: var(--adm-font-size-huge);
line-height: 25px;
&:not(.adm-modal-button-primary) {
padding-top: 0;
Expand Down
Loading

0 comments on commit b63cdce

Please sign in to comment.