Skip to content

Commit 755c6db

Browse files
authored
Add design tokens to labs feature (#28023)
1 parent 4a90331 commit 755c6db

File tree

2 files changed

+21
-21
lines changed

2 files changed

+21
-21
lines changed

src/panels/config/labs/dialog-labs-preview-feature-enable.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ export class DialogLabsPreviewFeatureEnable
204204
--md-list-item-trailing-space: var(--ha-space-6);
205205
margin: 0;
206206
padding: 0;
207-
border-top: 1px solid var(--divider-color);
207+
border-top: var(--ha-border-width-sm) solid var(--divider-color);
208208
}
209209
210210
div[slot="actions"] > div {

src/panels/config/labs/ha-config-labs.ts

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ class HaConfigLabs extends SubscribeMixin(LitElement) {
387387
.content {
388388
max-width: 800px;
389389
margin: 0 auto;
390-
padding: 16px;
390+
padding: var(--ha-space-4);
391391
min-height: calc(100vh - 64px);
392392
display: flex;
393393
flex-direction: column;
@@ -398,7 +398,7 @@ class HaConfigLabs extends SubscribeMixin(LitElement) {
398398
}
399399
400400
ha-card {
401-
margin-bottom: 16px;
401+
margin-bottom: var(--ha-space-4);
402402
position: relative;
403403
transition: box-shadow 0.3s ease;
404404
}
@@ -410,12 +410,12 @@ class HaConfigLabs extends SubscribeMixin(LitElement) {
410410
@keyframes highlight-fade {
411411
0% {
412412
box-shadow:
413-
0 0 0 2px var(--primary-color),
414-
0 0 12px rgba(var(--rgb-primary-color), 0.4);
413+
0 0 0 var(--ha-border-width-md) var(--primary-color),
414+
0 0 var(--ha-shadow-blur-lg) rgba(var(--rgb-primary-color), 0.4);
415415
}
416416
100% {
417417
box-shadow:
418-
0 0 0 2px transparent,
418+
0 0 0 var(--ha-border-width-md) transparent,
419419
0 0 0 transparent;
420420
}
421421
}
@@ -424,26 +424,26 @@ class HaConfigLabs extends SubscribeMixin(LitElement) {
424424
.intro-card {
425425
display: flex;
426426
flex-direction: column;
427-
gap: 16px;
427+
gap: var(--ha-space-4);
428428
}
429429
430430
.intro-card h1 {
431431
margin: 0;
432432
}
433433
434434
.intro-text {
435-
margin: 0 0 12px;
435+
margin: 0 0 var(--ha-space-3);
436436
}
437437
438438
/* Feature cards */
439439
.card-content {
440-
padding: 16px;
440+
padding: var(--ha-space-4);
441441
}
442442
443443
.card-header {
444444
display: flex;
445-
gap: 12px;
446-
margin-bottom: 16px;
445+
gap: var(--ha-space-3);
446+
margin-bottom: var(--ha-space-4);
447447
align-items: flex-start;
448448
}
449449
@@ -475,7 +475,7 @@ class HaConfigLabs extends SubscribeMixin(LitElement) {
475475
.empty {
476476
max-width: 500px;
477477
margin: 0 auto;
478-
padding: 48px 16px;
478+
padding: var(--ha-space-12) var(--ha-space-4);
479479
text-align: center;
480480
}
481481
@@ -487,11 +487,11 @@ class HaConfigLabs extends SubscribeMixin(LitElement) {
487487
}
488488
489489
.empty h1 {
490-
margin: 24px 0 16px;
490+
margin: var(--ha-space-6) 0 var(--ha-space-4);
491491
}
492492
493493
.empty p {
494-
margin: 0 0 24px;
494+
margin: 0 0 var(--ha-space-6);
495495
font-size: 16px;
496496
line-height: 24px;
497497
color: var(--secondary-text-color);
@@ -500,7 +500,7 @@ class HaConfigLabs extends SubscribeMixin(LitElement) {
500500
.empty a {
501501
display: inline-flex;
502502
align-items: center;
503-
gap: 4px;
503+
gap: var(--ha-space-1);
504504
color: var(--primary-color);
505505
text-decoration: none;
506506
font-weight: 500;
@@ -511,9 +511,9 @@ class HaConfigLabs extends SubscribeMixin(LitElement) {
511511
}
512512
513513
.empty a:focus-visible {
514-
outline: 2px solid var(--primary-color);
514+
outline: var(--ha-border-width-md) solid var(--primary-color);
515515
outline-offset: 2px;
516-
border-radius: 4px;
516+
border-radius: var(--ha-border-radius-sm);
517517
}
518518
519519
.empty a ha-svg-icon {
@@ -528,15 +528,15 @@ class HaConfigLabs extends SubscribeMixin(LitElement) {
528528
justify-content: space-between;
529529
align-items: center;
530530
flex-wrap: wrap;
531-
gap: 8px;
532-
padding: 8px;
533-
border-top: 1px solid var(--divider-color);
531+
gap: var(--ha-space-2);
532+
padding: var(--ha-space-2);
533+
border-top: var(--ha-border-width-sm) solid var(--divider-color);
534534
}
535535
536536
.card-actions > div {
537537
display: flex;
538538
flex-wrap: wrap;
539-
gap: 8px;
539+
gap: var(--ha-space-2);
540540
}
541541
`,
542542
];

0 commit comments

Comments
 (0)