fix(ui): use one spacing rhythm for empty states

Shared empty states now use the same gaps everywhere: 16px icon to title, 8px title to description and 16px before the actions (20/24px for the large size). Actions sit in one centered row. On phones the padding is tighter and the large size no longer reserves 400px of empty card. The Servers page drops its own padding override and follows the shared style.
This commit is contained in:
Juan Denis committed 2026-11-09 16:16:31 -05:00
1 parent a6131ac6bc
commit 88f6e7c7c6
2 files changed
+24 -42

No files matched your search

@@ -20,12 +20,11 @@
h3 {
font-size: $text-md;
font-weight: $font-weight-semibold;
margin-bottom: $space-2;
margin: 0 0 $space-2;
}
p {
color: $text-secondary;
margin-bottom: $space-6;
}
// When nested inside a card, drop the card-in-card double background.
@@ -40,7 +39,7 @@
&__icon {
color: $text-tertiary;
margin-bottom: $spacing-md;
margin-bottom: $space-4;
opacity: 0.5;
}
@@ -48,18 +47,23 @@
font-size: $text-lg;
font-weight: $font-weight-semibold;
color: $text-secondary;
margin: 0 0 $spacing-sm;
margin: 0 0 $space-2;
}
&__description {
font-size: $text-sm;
color: $text-tertiary;
max-width: 400px;
margin: 0 0 $spacing-md;
margin: 0;
}
// Single gap above the action area (after description, or title if none)
&__action {
margin-top: $spacing-sm;
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: $space-2;
margin-top: $space-4;
}
// Stacked primary action + a subtle secondary cross-link (e.g. "Import them")
@@ -67,8 +71,8 @@
display: flex;
flex-direction: column;
align-items: center;
gap: $spacing-sm;
margin-top: $spacing-sm;
gap: $space-2;
margin-top: $space-4;
}
&__link {
@@ -93,7 +97,7 @@
.empty-state__icon {
opacity: 0.4;
margin-bottom: $space-6;
margin-bottom: $space-5;
}
.empty-state__title {
@@ -103,11 +107,15 @@
.empty-state__description {
font-size: $text-base;
max-width: 480px;
margin-bottom: $space-6;
}
.empty-state__action {
margin-top: $space-4;
.empty-state__action,
.empty-state__actions {
margin-top: $space-6;
}
@include respond-to($breakpoint-md) {
min-height: 0;
}
}
@@ -131,4 +139,8 @@ html .empty-state {
p {
margin: 0;
}
@include respond-to($breakpoint-md) {
padding: $space-6 $space-4;
}
}
-30
View File
@@ -305,36 +305,6 @@
to { opacity: 1; transform: translateY(0); }
}
// Scoped under .servers-page: as a bare top-level `.empty-state` this block
// used to win the cascade app-wide over the shared styles in
// components/_empty-state.scss (see the specificity-hack comment there).
.servers-page .empty-state {
text-align: center;
padding: $space-16 $space-6;
background: $bg-card;
border: 1px solid $border-subtle;
border-radius: $radius-card;
.empty-icon {
width: 64px;
height: 64px;
color: $text-tertiary;
margin-bottom: $space-4;
}
h3 {
font-size: $text-lg;
font-weight: $font-weight-semibold;
color: $text-primary;
margin: 0 0 $space-2;
}
p {
color: $text-secondary;
margin: 0 0 $space-6;
}
}
// ============================================
// SERVER DETAIL PAGE
// ============================================