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
@@ -19,7 +19,7 @@ Please see LICENSE files in the repository root for full details.
.mx_DeviceDetailHeading_renameForm {
display: grid;
gap: $spacing-16;
gap: var(--cpd-space-4x);
justify-content: left;
grid-template-columns: 100%;
}
@@ -27,7 +27,7 @@ Please see LICENSE files in the repository root for full details.
.mx_DeviceDetailHeading_renameFormButtons {
display: flex;
flex-direction: row;
gap: $spacing-8;
gap: var(--cpd-space-2x);
.mx_Spinner {
width: auto;
@@ -37,7 +37,7 @@ Please see LICENSE files in the repository root for full details.
.mx_DeviceDetailHeading_renameFormInput {
/* override field styles */
margin: 0 0 $spacing-4 0 !important;
margin: 0 0 var(--cpd-space-1x) 0 !important;
}
.mx_DeviceDetailHeading_renameFormHeading {
@@ -46,6 +46,6 @@ Please see LICENSE files in the repository root for full details.
.mx_DeviceDetailHeading_renameFormError {
color: $alert;
padding-right: $spacing-4;
padding-right: var(--cpd-space-1x);
display: block;
}
@@ -11,19 +11,19 @@ Please see LICENSE files in the repository root for full details.
flex-direction: column;
box-sizing: border-box;
margin-top: $spacing-16;
padding: $spacing-24;
margin-top: var(--cpd-space-4x);
padding: var(--cpd-space-6x);
border-radius: 8px;
border: 1px solid $quinary-content;
}
.mx_DeviceDetails_section {
padding-bottom: $spacing-20;
margin-bottom: $spacing-20;
padding-bottom: var(--cpd-space-5x);
margin-bottom: var(--cpd-space-5x);
border-bottom: 1px solid $quinary-content;
display: grid;
gap: $spacing-24;
gap: var(--cpd-space-6x);
justify-content: left;
grid-template-columns: 100%;
@@ -42,7 +42,7 @@ Please see LICENSE files in the repository root for full details.
font-size: $font-12px;
color: $secondary-content;
line-height: $font-14px;
margin-top: $spacing-4;
margin-top: var(--cpd-space-1x);
}
}
@@ -61,7 +61,7 @@ Please see LICENSE files in the repository root for full details.
}
td {
padding-top: $spacing-8;
padding-top: var(--cpd-space-2x);
}
.mxDeviceDetails_metadataLabel {
@@ -77,7 +77,7 @@ Please see LICENSE files in the repository root for full details.
display: flex;
flex-direction: row;
align-items: center;
gap: $spacing-4;
gap: var(--cpd-space-1x);
}
.mx_DeviceDetails_pushNotifications {
@@ -13,7 +13,7 @@ Please see LICENSE files in the repository root for full details.
align-items: flex-start;
box-sizing: border-box;
padding: $spacing-16;
padding: var(--cpd-space-4x);
border: 1px solid $quinary-content;
border-radius: 8px;
@@ -24,7 +24,7 @@ Please see LICENSE files in the repository root for full details.
display: flex;
align-items: center;
justify-content: center;
margin-right: $spacing-16;
margin-right: var(--cpd-space-4x);
border-radius: 8px;
height: 40px;
@@ -53,7 +53,7 @@ Please see LICENSE files in the repository root for full details.
flex: 1 1;
}
.mx_DeviceSecurityCard_heading {
margin: 0 0 $spacing-4 0;
margin: 0 0 var(--cpd-space-1x) 0;
}
.mx_DeviceSecurityCard_description {
margin: 0;
@@ -62,5 +62,5 @@ Please see LICENSE files in the repository root for full details.
}
.mx_DeviceSecurityCard_actions {
margin-top: $spacing-16;
margin-top: var(--cpd-space-4x);
}
@@ -22,20 +22,20 @@ Please see LICENSE files in the repository root for full details.
}
.mx_DeviceTile_metadata {
margin-top: $spacing-4;
margin-top: var(--cpd-space-1x);
font: var(--cpd-font-body-sm-regular);
color: $secondary-content;
}
.mx_DeviceTile_inactiveIcon {
height: 14px;
margin-right: $spacing-8;
margin-right: var(--cpd-space-2x);
vertical-align: middle;
}
.mx_DeviceTile_actions {
display: grid;
gap: $spacing-8;
gap: var(--cpd-space-2x);
grid-auto-flow: column;
margin-left: $spacing-8;
margin-left: var(--cpd-space-2x);
}
@@ -9,9 +9,9 @@ Please see LICENSE files in the repository root for full details.
.mx_DeviceTypeIcon {
flex: 0 0 auto;
position: relative;
margin-right: $spacing-8;
margin-right: var(--cpd-space-2x);
/* creates space for verification icon to overlap */
padding: 0 $spacing-8 $spacing-8 0;
padding: 0 var(--cpd-space-2x) var(--cpd-space-2x) 0;
}
.mx_DeviceTypeIcon_deviceIconWrapper {
@@ -22,7 +22,7 @@ Please see LICENSE files in the repository root for full details.
width: 40px;
box-sizing: border-box;
border: $spacing-8 solid var(--background-color);
border: var(--cpd-space-2x) solid var(--background-color);
border-radius: 50%;
color: var(--icon-color);
background-color: var(--background-color);
@@ -45,7 +45,7 @@ Please see LICENSE files in the repository root for full details.
height: 24px;
width: 24px;
box-sizing: border-box;
padding: $spacing-4;
padding: var(--cpd-space-1x);
border: 1px solid $quinary-content;
border-radius: 50%;
@@ -15,9 +15,9 @@ Please see LICENSE files in the repository root for full details.
.mx_FilteredDeviceList_list {
list-style-type: none;
display: grid;
gap: $spacing-16;
gap: var(--cpd-space-4x);
margin: 0;
padding: 0 $spacing-16;
padding: 0 var(--cpd-space-4x);
}
.mx_FilteredDeviceList_listItem {
@@ -26,13 +26,13 @@ Please see LICENSE files in the repository root for full details.
}
.mx_FilteredDeviceList_securityCard {
margin-bottom: $spacing-32;
margin-bottom: var(--cpd-space-8x);
}
.mx_FilteredDeviceList_noResults {
width: 100%;
text-align: center;
margin-bottom: $spacing-32;
margin-bottom: var(--cpd-space-8x);
}
.mx_FilteredDeviceList_headerButton {
@@ -40,7 +40,7 @@ Please see LICENSE files in the repository root for full details.
/* override inline button styling */
display: flex !important;
flex-direction: row;
gap: $spacing-8;
gap: var(--cpd-space-2x);
}
.mx_FilteredDeviceList_deviceDetails {
@@ -11,12 +11,12 @@ Please see LICENSE files in the repository root for full details.
flex-direction: row;
align-items: center;
box-sizing: border-box;
gap: $spacing-16;
gap: var(--cpd-space-4x);
width: 100%;
height: 48px;
padding: 0 $spacing-16;
margin-bottom: $spacing-32;
padding: 0 var(--cpd-space-4x);
margin-bottom: var(--cpd-space-8x);
background-color: $panels;
border-radius: 8px;
@@ -7,5 +7,5 @@ Please see LICENSE files in the repository root for full details.
*/
.mx_SecurityRecommendations_spacing {
height: $spacing-16;
height: var(--cpd-space-4x);
}