Replace legacy $spacing-X vars with Compound Design Tokens (#34380)

* Replace legacy `$spacing-X` vars with Compound Design Tokens

* Remove unused font size vars

* Use calc to get negative spacing vars
This commit is contained in:
Michael Telatynski
2026-07-22 10:10:57 +00:00
committed by GitHub
parent ef8cfda6fe
commit 49a2bdd7e4
87 changed files with 343 additions and 380 deletions
@@ -11,7 +11,7 @@ Please see LICENSE files in the repository root for full details.
display: flex;
flex-direction: row;
align-items: flex-start;
padding: $spacing-12 0;
padding: var(--cpd-space-3x) 0;
border-bottom: 1px solid $system;
@@ -28,7 +28,7 @@ Please see LICENSE files in the repository root for full details.
flex: 0 0;
box-sizing: border-box;
margin-right: $spacing-8;
margin-right: var(--cpd-space-2x);
border: 2px solid $location-live-color;
border-radius: 50%;
}
@@ -44,7 +44,7 @@ Please see LICENSE files in the repository root for full details.
.mx_BeaconListItem_status {
/* override beacon status padding */
padding: 0 !important;
margin-bottom: $spacing-8;
margin-bottom: var(--cpd-space-2x);
.mx_BeaconStatus_label {
font-weight: var(--cpd-font-weight-semibold);
@@ -13,7 +13,7 @@ Please see LICENSE files in the repository root for full details.
justify-content: flex-start;
box-sizing: border-box;
padding: $spacing-8;
padding: var(--cpd-space-2x);
color: var(--color);
font-size: $font-12px;
@@ -34,7 +34,7 @@ Please see LICENSE files in the repository root for full details.
width: 32px;
flex: 0 0 32px;
margin-right: $spacing-8;
margin-right: var(--cpd-space-2x);
}
.mx_BeaconStatus_description {
@@ -43,7 +43,7 @@ Please see LICENSE files in the repository root for full details.
flex-direction: column;
line-height: $font-14px;
padding-right: $spacing-8;
padding-right: var(--cpd-space-2x);
white-space: nowrap;
overflow: hidden;
@@ -12,7 +12,7 @@ Please see LICENSE files in the repository root for full details.
max-width: 150px;
height: 38px;
box-sizing: content-box;
padding-top: $spacing-8;
padding-top: var(--cpd-space-2x);
}
.mx_BeaconStatusTooltip_inner {
@@ -53,11 +53,11 @@ Please see LICENSE files in the repository root for full details.
.mx_BeaconViewDialog_mapFallbackMessage {
color: $secondary-content;
margin-bottom: $spacing-16;
margin-bottom: var(--cpd-space-4x);
}
.mx_BeaconViewDialog_viewListButton {
position: absolute;
top: $spacing-24;
left: $spacing-24;
top: var(--cpd-space-6x);
left: var(--cpd-space-6x);
}
@@ -8,7 +8,7 @@ Please see LICENSE files in the repository root for full details.
.mx_DialogOwnBeaconStatus {
position: absolute;
bottom: $spacing-32;
bottom: var(--cpd-space-8x);
width: 300px;
margin-left: -150px;
left: 50%;
@@ -23,14 +23,14 @@ Please see LICENSE files in the repository root for full details.
border-radius: 8px;
box-shadow: 4px 4px 12px 0 $menu-box-shadow-color;
padding: 0 $spacing-12;
padding: 0 var(--cpd-space-3x);
}
.mx_DialogOwnBeaconStatus_avatarIcon {
flex: 0 0;
height: 32px;
width: 32px;
margin: $spacing-8 0 $spacing-8 0;
margin: var(--cpd-space-2x) 0 var(--cpd-space-2x) 0;
}
.mx_DialogOwnBeaconStatus_avatar {
@@ -39,7 +39,7 @@ Please see LICENSE files in the repository root for full details.
border: 2px solid $location-live-color;
border-radius: 50%;
margin: $spacing-8 0 $spacing-8 0;
margin: var(--cpd-space-2x) 0 var(--cpd-space-2x) 0;
}
.mx_DialogOwnBeaconStatus_status {
@@ -17,7 +17,7 @@ Please see LICENSE files in the repository root for full details.
flex-direction: column;
box-sizing: border-box;
padding: $spacing-16;
padding: var(--cpd-space-4x);
background-color: $background;
box-shadow: 0px 4px 4px $menu-box-shadow-color;
@@ -28,7 +28,7 @@ Please see LICENSE files in the repository root for full details.
justify-content: space-between;
flex: 0 0;
margin-bottom: $spacing-16;
margin-bottom: var(--cpd-space-4x);
color: $primary-content;
@@ -10,7 +10,7 @@ Please see LICENSE files in the repository root for full details.
width: 100%;
box-sizing: border-box;
padding: $spacing-4;
padding: var(--cpd-space-1x);
text-align: center;
background-color: $accent;
@@ -7,7 +7,7 @@ Please see LICENSE files in the repository root for full details.
*/
.mx_OwnBeaconStatus_button {
margin-left: $spacing-8;
margin-left: var(--cpd-space-2x);
}
.mx_EventTile[data-layout="bubble"] .mx_OwnBeaconStatus_button {
@@ -17,7 +17,7 @@ Please see LICENSE files in the repository root for full details.
/* override copyable text style to make compact */
.mx_CopyableText_copyButton {
height: 13px;
margin-left: $spacing-8 !important;
margin-left: var(--cpd-space-2x) !important;
position: relative;
top: -1px;
width: 13px;