Skip to content

Commit 6efe444

Browse files
timmo001wendevlin
andauthored
Use space tokens in more info dialog area (#28627)
Co-authored-by: Wendelin <[email protected]>
1 parent 09c9665 commit 6efe444

34 files changed

+94
-91
lines changed

src/dialogs/more-info/components/ha-more-info-control-select-container.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ export class HaMoreInfoControlSelectContainer extends LitElement {
3737
overflow: auto;
3838
-ms-overflow-style: none; /* IE and Edge */
3939
scrollbar-width: none; /* Firefox */
40-
margin: -2px -24px;
41-
padding: 2px 24px;
40+
margin: -2px calc(var(--ha-space-6) * -1);
41+
padding: 2px var(--ha-space-6);
4242
}
4343
.controls-scroll::-webkit-scrollbar {
4444
display: none;

src/dialogs/more-info/components/ha-more-info-state-header.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ export class HaMoreInfoStateHeader extends LitElement {
8484
font-weight: var(--ha-font-weight-medium);
8585
line-height: var(--ha-line-height-normal);
8686
letter-spacing: 0.1px;
87-
padding: 4px 0;
88-
margin-bottom: 20px;
87+
padding: var(--ha-space-1) 0;
88+
margin-bottom: var(--ha-space-5);
8989
cursor: pointer;
9090
user-select: none;
9191
-webkit-user-select: none;

src/dialogs/more-info/components/lights/dialog-light-color-favorite.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,14 +268,14 @@ class DialogLightColorFavorite extends LitElement {
268268
flex-direction: column;
269269
align-items: center;
270270
justify-content: center;
271-
padding: 24px;
271+
padding: var(--ha-space-6);
272272
flex: 1;
273273
}
274274
.modes {
275275
display: flex;
276276
flex-direction: row;
277277
justify-content: flex-end;
278-
padding: 0 24px;
278+
padding: 0 var(--ha-space-6);
279279
}
280280
.wheel {
281281
width: 30px;

src/dialogs/more-info/components/lights/ha-more-info-light-favorite-colors.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,14 +254,14 @@ export class HaMoreInfoLightFavoriteColors extends LitElement {
254254
display: flex;
255255
align-items: center;
256256
justify-content: center;
257-
margin: -8px;
257+
margin: calc(var(--ha-space-2) * -1);
258258
flex-wrap: wrap;
259259
max-width: 250px;
260260
user-select: none;
261261
}
262262
263263
.container > * {
264-
margin: 8px;
264+
margin: var(--ha-space-2);
265265
}
266266
267267
.color {

src/dialogs/more-info/components/lights/light-color-rgb-picker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,7 @@ class LightRgbColorPicker extends LitElement {
515515
hr {
516516
border-color: var(--divider-color);
517517
border-bottom: none;
518-
margin: 16px 0;
518+
margin: var(--ha-space-4) 0;
519519
}
520520
`,
521521
];

src/dialogs/more-info/components/more-info-control-style.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,29 +15,29 @@ export const moreInfoControlStyle = css`
1515
}
1616
1717
.controls:not(:last-child) {
18-
margin-bottom: 24px;
18+
margin-bottom: var(--ha-space-6);
1919
}
2020
2121
.controls > *:not(:last-child) {
22-
margin-bottom: 24px;
22+
margin-bottom: var(--ha-space-6);
2323
}
2424
2525
.buttons {
2626
display: flex;
2727
align-items: center;
2828
justify-content: center;
29-
margin-bottom: 12px;
29+
margin-bottom: var(--ha-space-3);
3030
}
3131
3232
.buttons > * {
33-
margin: 8px;
33+
margin: var(--ha-space-2);
3434
}
3535
3636
ha-attributes {
3737
display: block;
3838
width: 100%;
3939
}
4040
ha-more-info-control-select-container + ha-attributes:not([empty]) {
41-
margin-top: 16px;
41+
margin-top: var(--ha-space-4);
4242
}
4343
`;

src/dialogs/more-info/components/siren/ha-more-info-siren-advanced-controls.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ class MoreInfoSirenAdvancedControls extends LitElement {
209209
flex-direction: row;
210210
justify-content: center;
211211
gap: var(--ha-space-4);
212-
margin-top: 16px;
212+
margin-top: var(--ha-space-4);
213213
}
214214
ha-control-button {
215215
--control-button-border-radius: var(--ha-border-radius-xl);

src/dialogs/more-info/components/voice/ha-more-info-view-voice-assistants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class MoreInfoViewVoiceAssistants extends LitElement {
4848
flex-direction: column;
4949
align-items: center;
5050
justify-content: center;
51-
padding: 24px;
51+
padding: var(--ha-space-6);
5252
flex: 1;
5353
}
5454
`,

src/dialogs/more-info/controls/more-info-automation.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,15 @@ class MoreInfoAutomation extends LitElement {
5252
justify-content: space-between;
5353
}
5454
.actions {
55-
margin: 8px 0;
55+
margin: var(--ha-space-2) 0;
5656
display: flex;
5757
flex-wrap: wrap;
5858
justify-content: center;
5959
}
6060
hr {
6161
border-color: var(--divider-color);
6262
border-bottom: none;
63-
margin: 16px 0;
63+
margin: var(--ha-space-4) 0;
6464
}
6565
`;
6666
}

src/dialogs/more-info/controls/more-info-camera.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ class MoreInfoCamera extends LitElement {
106106
flex-wrap: wrap;
107107
justify-content: flex-end;
108108
box-sizing: border-box;
109-
padding: 16px;
109+
padding: var(--ha-space-4);
110110
z-index: 1;
111111
gap: var(--ha-space-2);
112112
}

0 commit comments

Comments
 (0)