Skip to content

Commit

Permalink
Resolved #6360 - When changing the text size, it is necessary to chan…
Browse files Browse the repository at this point in the history
…ge its line-height proportionally
  • Loading branch information
tsv2013 committed Jun 22, 2023
1 parent fad97af commit 8d28f0c
Show file tree
Hide file tree
Showing 32 changed files with 337 additions and 132 deletions.
7 changes: 4 additions & 3 deletions src/common-styles/sv-actionbar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,14 @@ button.sv-action-bar-item {
.sv-action-bar--default-size-mode .sv-action-bar-item {
height: calcSize(5);
font-size: calcFontSize(1);
line-height: calcSize(3);
line-height: calcLineHeight(1.5);
margin: 0 calcSize(1);
}

.sv-action-bar--small-size-mode .sv-action-bar-item {
height: calcSize(4);
font-size: calcFontSize(0.75);
line-height: calcSize(2);
line-height: calcLineHeight(1);
margin: 0 calcSize(0.5);
}

Expand Down Expand Up @@ -97,6 +97,7 @@ button.sv-action-bar-item {
}

.sv-action-bar-item--active.sv-action-bar-item--pressed {

&:focus,
&:focus-visible {
outline: none;
Expand Down Expand Up @@ -145,7 +146,7 @@ button.sv-action-bar-item {
border-radius: calcCornerRadius(0.5);
background-color: transparent;
cursor: pointer;
line-height: calcSize(3);
line-height: calcLineHeight(1.5);
font-size: calcFontSize(1);
font-family: var(--font-family, $font-family);
}
Expand Down
4 changes: 2 additions & 2 deletions src/common-styles/sv-brand-info.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ sv-brand-info {}
.sv-brand-info__text {
font-weight: 600;
font-size: calcFontSize(1);
line-height: calcSize(3);
line-height: calcLineHeight(1.5);
color: #161616;
}

Expand All @@ -33,7 +33,7 @@ sv-brand-info {}
.sv-brand-info__terms {
font-weight: 400;
font-size: calcFontSize(0.75);
line-height: calcSize(2);
line-height: calcLineHeight(1);

a {
color: #909090;
Expand Down
2 changes: 1 addition & 1 deletion src/common-styles/sv-buttongroup.scss
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
appearance: none;
width: 100%;
padding: 11px calcSize(2);
line-height: calcSize(3);
line-height: calcLineHeight(1.5);
outline: none;
font-size: calcFontSize(1);
font-weight: 400;
Expand Down
2 changes: 1 addition & 1 deletion src/common-styles/sv-drag-drop.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
font-family: var(--font-family, $font-family);
font-size: calcFontSize(1);
padding-left: calcSize(2.5);
line-height: calcSize(3);
line-height: calcLineHeight(1.5);
}

.sv-matrixdynamic__drag-icon {
Expand Down
6 changes: 3 additions & 3 deletions src/common-styles/sv-list.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
}

.sv-list__empty-text {
line-height: calcSize(3);
line-height: calcLineHeight(1.5);
font-size: calcFontSize(1);
font-weight: 400;
text-align: center;
Expand Down Expand Up @@ -48,7 +48,7 @@
padding-inline-start: calcSize(2);
color: $foreground;
font-size: calcFontSize(1);
line-height: calcSize(3);
line-height: calcLineHeight(1.5);
cursor: pointer;
overflow: hidden;
text-overflow: ellipsis;
Expand Down Expand Up @@ -198,7 +198,7 @@ li:focus .sv-list__item.sv-list__item--selected {
color: $foreground;
padding: calcSize(1.5) calcSize(3);
padding-inline-start: calcSize(7);
line-height: calcSize(3);
line-height: calcLineHeight(1.5);
border: none;
}

Expand Down
6 changes: 3 additions & 3 deletions src/common-styles/sv-popup.scss
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ sv-popup {
.sv-popup__body-header {
font-family: Open Sans;
font-size: calcFontSize(1.5);
line-height: calcSize(4);
line-height: calcLineHeight(2);
font-style: normal;
font-weight: 700;
margin-bottom: calcSize(2);
Expand Down Expand Up @@ -339,7 +339,7 @@ sv-popup {
.sv-list__input {
color: $foreground-light;
font-size: calcFontSize(1);
line-height: calcSize(3);
line-height: calcLineHeight(1.5);
font-family: $font-family;
padding: calcSize(0.5) 0 calcSize(0.5) calcSize(1);
}
Expand Down Expand Up @@ -390,4 +390,4 @@ sv-popup {
.sv-list__container {
flex-grow: 1;
}
}
}
4 changes: 2 additions & 2 deletions src/common-styles/sv-ranking.scss
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
border: calcSize(0.25) solid transparent;
width: calcSize(5);
height: calcSize(5);
line-height: calcSize(3);
line-height: calcLineHeight(1.5);
box-sizing: border-box;
font-weight: 600;
margin-left: calcSize(0);
Expand All @@ -96,7 +96,7 @@
white-space: nowrap;
color: $foreground;
font-size: calcFontSize(1);
line-height: calcSize(3);
line-height: calcLineHeight(1.5);
margin: 0 calcSize(2);
}

Expand Down
8 changes: 5 additions & 3 deletions src/common-styles/sv-save-data.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

font-family: var(--font-family, $font-family);
font-size: calcFontSize(1);
line-height: calcSize(3);
line-height: calcLineHeight(1.5);

display: flex;
flex-direction: row;
Expand Down Expand Up @@ -50,6 +50,7 @@
flex-shrink: 0;
}
}

.sv-save-data_root--shown.sv-save-data_success,
.sv-save-data_root--shown.sv-save-data_error {
opacity: 1;
Expand All @@ -66,7 +67,7 @@
.sv-save-data_root.sv-save-data_error .sv-save-data_button {
font-weight: 600;
font-size: calcFontSize(1);
line-height: calcSize(3);
line-height: calcLineHeight(1.5);
height: calcSize(5);
color: #ffffff;
background-color: $red;
Expand All @@ -76,6 +77,7 @@
display: flex;
align-items: center;
}

.sv-save-data_root.sv-save-data_error .sv-save-data_button:hover,
.sv-save-data_root.sv-save-data_error .sv-save-data_button:focus {
color: $red;
Expand All @@ -86,4 +88,4 @@
background-color: $primary;
color: #ffffff;
font-weight: 600;
}
}
8 changes: 4 additions & 4 deletions src/defaultV2-theme/blocks/mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
font-size: $font-pagetitle-size;
color: $font-pagetitle-color;
position: static;
line-height: calcSize(4);
line-height: calcLineHeight(2);
margin: calcSize(0.5) 0px;
}

Expand All @@ -14,7 +14,7 @@
font-size: $font-pagedescription-size;
color: $font-pagedescription-color;
position: static;
line-height: calcSize(3);
line-height: calcLineHeight(1.5);
margin: calcSize(0.5) 0px;
}

Expand All @@ -25,8 +25,8 @@
padding-inline-start: 0;
padding-inline-end: 0;

& + span {
&+span {
float: none;
width: auto;
}
}
}
2 changes: 1 addition & 1 deletion src/defaultV2-theme/blocks/sd-action.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
font-family: var(--font-family, $font-family);
font-style: normal;
font-size: calcFontSize(1);
line-height: calcSize(3);
line-height: calcLineHeight(1.5);
outline: none;
}

Expand Down
6 changes: 3 additions & 3 deletions src/defaultV2-theme/blocks/sd-boolean.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
font-weight: $font-editorfont-weight;
font-size: $font-editorfont-size;
color: $foreground-light;
line-height: calcSize(3);
line-height: calcLineHeight(1.5);
padding: calcSize(1) calcSize(3);
}

Expand All @@ -32,7 +32,7 @@
border-radius: calcSize(12.5);
}

.sd-boolean__control:focus ~ .sd-boolean__switch {
.sd-boolean__control:focus~.sd-boolean__switch {
box-shadow: inset 0 0 0 2px $primary;
}

Expand Down Expand Up @@ -85,4 +85,4 @@

.sd-boolean--error {
background-color: $red-light;
}
}
4 changes: 2 additions & 2 deletions src/defaultV2-theme/blocks/sd-button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
font-style: normal;
font-weight: 600;
font-size: calcFontSize(1);
line-height: calcSize(3);
line-height: calcLineHeight(1.5);
text-align: center;
color: $primary;
border: none;
Expand Down Expand Up @@ -48,4 +48,4 @@
.sd-btn--action:disabled {
color: $primary-foreground-disabled;
pointer-events: none;
}
}
4 changes: 2 additions & 2 deletions src/defaultV2-theme/blocks/sd-description.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
font-weight: $font-questiondescription-weight;
color: $font-questiondescription-color;
font-size: $font-questiondescription-size;
line-height: calcSize(3);
line-height: calcLineHeight(1.5);
white-space: normal;
word-break: break-word;
}

.sd-element__header .sd-description {
margin-top: calcSize(0.5);
}
}
10 changes: 7 additions & 3 deletions src/defaultV2-theme/blocks/sd-dropdown.scss
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
font-weight: $font-editorfont-weight;
color: $font-editorfont-color;
font-size: $font-editorfont-size;
line-height: calcSize(3);
line-height: calcLineHeight(1.5);
background-color: transparent;
overflow: hidden;
text-overflow: ellipsis;
Expand All @@ -107,11 +107,13 @@
text-overflow: ellipsis;
white-space: nowrap;
display: inline-block;
line-height: calcSize(3);
line-height: calcLineHeight(1.5);
appearance: none;
}

.sd-dropdown__hint-prefix {
color: $foreground-light;

span {
white-space: pre;
}
Expand All @@ -120,14 +122,16 @@
.sd-dropdown__hint-suffix {
display: flex;
color: $foreground-light;

span {
white-space: pre;
}
}

[dir="rtl"],
[style*="direction:rtl"],
[style*="direction: rtl"] {
.sd-dropdown {
background-position: left calcSize(1.5) top 50%, 0 0;
}
}
}
Loading

0 comments on commit 8d28f0c

Please sign in to comment.