Compound Typography pass (#11103)
* Integrate compound design tokens The icons should not be included in this repo, and should live in the compound design token repo, but for simplicity sake at this phase of the integration they will be added here * Delete unused or incorrect - sass variables * Typography pass * Deprecate _font-weights.pcss and use Compound instead * lint fix * Fix snapshot * Fix typography pass feedback * Remove unwanted e2e test cypress tests should test functionality not visual output. And we should not test visual output by inspecting CSS properties * lintfix * Migration script for baseFontSize * Updates after design review * Update font scaling panel to use min/max size * Fix custom font * Fix font slider e2e test * Update custom font * Update new baseFontSizeV2 * Disambiguate heading props * Fix appearance test * change max font size * fix e2ee test * fix tests * test baseFontSize migration code * typescript strict * Migrate baseFontSize account setting * Change assertion for font size * Fix font size controller test
This commit is contained in:
parent
ce479c5774
commit
9c7d935aae
199 changed files with 606 additions and 608 deletions
|
@ -73,7 +73,7 @@ limitations under the License.
|
|||
.mx_DecryptionFailureBar_start_headline {
|
||||
grid-area: headline;
|
||||
|
||||
font-weight: var(--font-semi-bold);
|
||||
font-weight: var(--cpd-font-weight-semibold);
|
||||
font-size: $font-16px;
|
||||
align-self: center;
|
||||
}
|
||||
|
|
|
@ -72,7 +72,7 @@ limitations under the License.
|
|||
.mx_EntityTile_name {
|
||||
flex: 1 1 0;
|
||||
overflow: hidden;
|
||||
font-size: $font-14px;
|
||||
font: var(--cpd-font-body-md-regular);
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
|
|
@ -29,7 +29,6 @@ $left-gutter: 64px;
|
|||
max-width: 100%;
|
||||
clear: both; /* TODO: check if this is necessary */
|
||||
padding-top: 18px;
|
||||
font-size: $font-14px;
|
||||
position: relative;
|
||||
|
||||
.mx_EventTile_avatar {
|
||||
|
@ -105,7 +104,7 @@ $left-gutter: 64px;
|
|||
|
||||
.mx_DisambiguatedProfile {
|
||||
color: $primary-content;
|
||||
font-size: $font-14px;
|
||||
font: var(--cpd-font-body-md-regular);
|
||||
display: inline-block;
|
||||
padding-bottom: 0px;
|
||||
padding-top: 0px;
|
||||
|
@ -697,11 +696,9 @@ $left-gutter: 64px;
|
|||
}
|
||||
|
||||
.markdown-body {
|
||||
font-family: inherit !important;
|
||||
white-space: normal !important;
|
||||
line-height: inherit !important;
|
||||
font: var(--cpd-font-body-md-regular) !important;
|
||||
letter-spacing: var(--cpd-font-letter-spacing-body-md);
|
||||
color: inherit; /* inherit the colour from the dark or light theme by default (but not for code blocks) */
|
||||
font-size: $font-14px;
|
||||
|
||||
pre,
|
||||
code {
|
||||
|
|
|
@ -23,7 +23,7 @@ limitations under the License.
|
|||
|
||||
h2 {
|
||||
font-size: $font-18px;
|
||||
font-weight: var(--font-semi-bold);
|
||||
font-weight: var(--cpd-font-weight-semibold);
|
||||
margin: 16px 0 16px 15px;
|
||||
}
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ limitations under the License.
|
|||
h2 {
|
||||
text-transform: uppercase;
|
||||
color: $h3-color;
|
||||
font-weight: var(--font-semi-bold);
|
||||
font-weight: var(--cpd-font-weight-semibold);
|
||||
font-size: $font-13px;
|
||||
padding-left: 3px;
|
||||
padding-right: 12px;
|
||||
|
@ -85,7 +85,7 @@ limitations under the License.
|
|||
display: flex;
|
||||
justify-content: center;
|
||||
color: $button-fg-color;
|
||||
font-weight: var(--font-semi-bold);
|
||||
font-weight: var(--cpd-font-weight-semibold);
|
||||
}
|
||||
|
||||
.mx_MemberList_invite.mx_AccessibleButton_disabled {
|
||||
|
|
|
@ -114,7 +114,7 @@ limitations under the License.
|
|||
min-height: 60px;
|
||||
justify-content: flex-start;
|
||||
align-items: flex-start;
|
||||
font-size: $font-14px;
|
||||
font: var(--cpd-font-body-md-regular);
|
||||
margin-right: 6px;
|
||||
|
||||
pre {
|
||||
|
@ -135,7 +135,7 @@ limitations under the License.
|
|||
box-shadow: none;
|
||||
color: $primary-content;
|
||||
background-color: $background;
|
||||
font-size: $font-14px;
|
||||
font: var(--cpd-font-body-md-regular);
|
||||
max-height: 120px;
|
||||
overflow: auto;
|
||||
|
||||
|
|
|
@ -99,7 +99,7 @@ limitations under the License.
|
|||
.mx_MessageComposerFormatBar_buttonTooltip {
|
||||
white-space: nowrap;
|
||||
font-size: $font-13px;
|
||||
font-weight: var(--font-semi-bold);
|
||||
font-weight: var(--cpd-font-weight-semibold);
|
||||
min-width: 54px;
|
||||
text-align: center;
|
||||
|
||||
|
|
|
@ -55,7 +55,7 @@ limitations under the License.
|
|||
> h2 {
|
||||
margin-top: 24px;
|
||||
font-size: $font-24px;
|
||||
font-weight: var(--font-semi-bold);
|
||||
font-weight: var(--cpd-font-weight-semibold);
|
||||
}
|
||||
|
||||
> p {
|
||||
|
|
|
@ -48,7 +48,7 @@ limitations under the License.
|
|||
|
||||
.mx_PinnedEventTile_sender {
|
||||
grid-area: name;
|
||||
font-weight: var(--font-semi-bold);
|
||||
font-weight: var(--cpd-font-weight-semibold);
|
||||
font-size: $font-15px;
|
||||
line-height: $font-24px;
|
||||
text-overflow: ellipsis;
|
||||
|
|
|
@ -86,7 +86,7 @@ limitations under the License.
|
|||
font-size: 12px;
|
||||
line-height: 15px;
|
||||
margin: 16px 16px 8px;
|
||||
font-weight: var(--font-semi-bold);
|
||||
font-weight: var(--cpd-font-weight-semibold);
|
||||
/* shouldn’t be actually focusable */
|
||||
outline: none;
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ limitations under the License.
|
|||
.mx_ReplyTile {
|
||||
position: relative;
|
||||
padding: 2px 0;
|
||||
font-size: $font-14px;
|
||||
font: var(--cpd-font-body-md-regular);
|
||||
|
||||
&.mx_ReplyTile_audio .mx_MFileBody_info_icon::before {
|
||||
mask-image: url("$(res)/img/element-icons/speaker.svg");
|
||||
|
@ -122,7 +122,7 @@ limitations under the License.
|
|||
gap: 4px;
|
||||
|
||||
.mx_DisambiguatedProfile {
|
||||
font-size: $font-14px;
|
||||
font: var(--cpd-font-body-md-regular);
|
||||
|
||||
display: inline-block; // anti-zalgo, with overflow hidden
|
||||
padding: 0;
|
||||
|
|
|
@ -44,8 +44,7 @@ limitations under the License.
|
|||
}
|
||||
|
||||
.mx_RoomBreadcrumbs_placeholder {
|
||||
font-weight: var(--font-semi-bold);
|
||||
font-size: $font-14px;
|
||||
font: var(--cpd-font-body-md-semibold);
|
||||
line-height: 32px; /* specifically to match the height this is not scaled */
|
||||
height: 32px;
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ limitations under the License.
|
|||
|
||||
.mx_RoomCallBanner_label {
|
||||
color: $primary-content;
|
||||
font-weight: var(--font-semi-bold);
|
||||
font-weight: var(--cpd-font-weight-semibold);
|
||||
padding-right: $spacing-8;
|
||||
|
||||
&::before {
|
||||
|
|
|
@ -71,8 +71,8 @@ limitations under the License.
|
|||
flex: 0 1 auto;
|
||||
overflow: hidden;
|
||||
color: $primary-content;
|
||||
font-weight: var(--font-semi-bold);
|
||||
font-size: $font-15px;
|
||||
font: var(--cpd-font-heading-sm-semibold);
|
||||
font-weight: var(--cpd-font-weight-semibold);
|
||||
min-height: 24px;
|
||||
align-items: center;
|
||||
border-radius: 6px;
|
||||
|
@ -135,15 +135,13 @@ limitations under the License.
|
|||
}
|
||||
|
||||
.mx_RoomHeader_topic {
|
||||
$lineHeight: $font-16px;
|
||||
$lines: 2;
|
||||
|
||||
flex: 1;
|
||||
color: $roomtopic-color;
|
||||
font-weight: 400;
|
||||
font-size: $font-13px;
|
||||
line-height: $lineHeight;
|
||||
max-height: calc($lineHeight * $lines);
|
||||
font: var(--cpd-font-body-sm-regular);
|
||||
line-height: 1rem;
|
||||
max-height: calc(1rem * $lines);
|
||||
|
||||
overflow: hidden;
|
||||
-webkit-line-clamp: $lines; /* See: https://drafts.csswg.org/css-overflow-3/#webkit-line-clamp */
|
||||
|
|
|
@ -20,9 +20,8 @@ limitations under the License.
|
|||
|
||||
.mx_RoomListHeader_contextLessTitle,
|
||||
.mx_RoomListHeader_contextMenuButton {
|
||||
font-size: $font-15px;
|
||||
line-height: $font-24px;
|
||||
font-weight: var(--font-semi-bold);
|
||||
font: var(--cpd-font-heading-sm-semibold);
|
||||
font-weight: var(--cpd-font-weight-semibold);
|
||||
padding: 1px 24px 1px 4px;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
|
|
|
@ -24,7 +24,7 @@ limitations under the License.
|
|||
|
||||
h3 {
|
||||
font-size: $font-18px;
|
||||
font-weight: var(--font-semi-bold);
|
||||
font-weight: var(--cpd-font-weight-semibold);
|
||||
|
||||
&.mx_RoomPreviewBar_spinnerTitle {
|
||||
display: flex;
|
||||
|
@ -141,7 +141,7 @@ limitations under the License.
|
|||
}
|
||||
|
||||
.mx_RoomPreviewBar_inviter {
|
||||
font-weight: var(--font-semi-bold);
|
||||
font-weight: var(--cpd-font-weight-semibold);
|
||||
}
|
||||
|
||||
a.mx_RoomPreviewBar_inviter {
|
||||
|
|
|
@ -23,10 +23,10 @@ limitations under the License.
|
|||
background-color: $system;
|
||||
border-radius: 8px;
|
||||
position: relative;
|
||||
font-size: $font-14px;
|
||||
font: var(--cpd-font-body-md-regular);
|
||||
|
||||
.mx_RoomPreviewCard_notice {
|
||||
font-weight: var(--font-semi-bold);
|
||||
font-weight: var(--cpd-font-weight-semibold);
|
||||
line-height: $font-24px;
|
||||
color: $primary-content;
|
||||
margin-top: $spacing-24;
|
||||
|
|
|
@ -145,9 +145,7 @@ limitations under the License.
|
|||
.mx_RoomSublist_headerText {
|
||||
flex: 1;
|
||||
max-width: calc(100% - 16px); /* 16px is the badge width */
|
||||
line-height: $font-16px;
|
||||
font-size: $font-13px;
|
||||
font-weight: var(--font-semi-bold);
|
||||
font: var(--cpd-font-body-sm-semibold);
|
||||
|
||||
/* Ellipsize any text overflow */
|
||||
text-overflow: ellipsis;
|
||||
|
@ -399,7 +397,7 @@ limitations under the License.
|
|||
.mx_RoomSublist_contextMenu_title {
|
||||
font-size: $font-15px;
|
||||
line-height: $font-20px;
|
||||
font-weight: var(--font-semi-bold);
|
||||
font-weight: var(--cpd-font-weight-semibold);
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
|
|
|
@ -71,11 +71,10 @@ limitations under the License.
|
|||
}
|
||||
|
||||
.mx_RoomTile_title {
|
||||
font-size: $font-14px;
|
||||
line-height: $font-18px;
|
||||
font: var(--cpd-font-heading-sm-medium);
|
||||
|
||||
&.mx_RoomTile_titleHasUnreadEvents {
|
||||
font-weight: var(--font-semi-bold);
|
||||
font-weight: var(--cpd-font-weight-semibold);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -61,7 +61,7 @@ limitations under the License.
|
|||
cursor: pointer;
|
||||
color: $primary-content;
|
||||
border-bottom: 2px solid $accent;
|
||||
font-weight: var(--font-semi-bold);
|
||||
font-weight: var(--cpd-font-weight-semibold);
|
||||
word-break: break-all; /* prevent the input area and cancel button from being overlapped by BaseCard */
|
||||
}
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ limitations under the License.
|
|||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
font-size: $font-14px;
|
||||
font: var(--cpd-font-body-md-regular);
|
||||
/* fixed line height to prevent emoji from being taller than text */
|
||||
line-height: $font-18px;
|
||||
justify-content: center;
|
||||
|
|
|
@ -107,7 +107,7 @@ limitations under the License.
|
|||
}
|
||||
|
||||
.mx_ThreadSummary_sender {
|
||||
font-weight: var(--font-semi-bold);
|
||||
font-weight: var(--cpd-font-weight-semibold);
|
||||
}
|
||||
|
||||
.mx_ThreadSummary_content {
|
||||
|
|
|
@ -57,8 +57,7 @@ limitations under the License.
|
|||
|
||||
.mx_WhoIsTypingTile_label {
|
||||
flex: 1;
|
||||
font-size: $font-14px;
|
||||
font-weight: var(--font-semi-bold);
|
||||
font: var(--cpd-font-body-md-semibold);
|
||||
color: $roomtopic-color;
|
||||
}
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ limitations under the License.
|
|||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
font-size: $font-14px;
|
||||
font: var(--cpd-font-body-md-regular);
|
||||
/* fixed line height to prevent emoji from being taller than text */
|
||||
line-height: $font-18px;
|
||||
justify-content: center;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue