CSS optimization

This commit is contained in:
Janus C. H. Knudsen 2026-01-14 00:47:06 +01:00
parent e739ce2ac7
commit 29f9c79764
22 changed files with 1175 additions and 642 deletions

View file

@ -2,6 +2,7 @@
* Attentions CSS
*
* Styling for attention/alert components on dashboard
* Reuses: swp-list-base, swp-list-item-base, swp-icon-container (components.css)
*/
/* ===========================================
@ -35,21 +36,21 @@ swp-attention-item:hover {
/* Severity: Urgent (red) */
swp-attention-item.urgent {
border-left-color: var(--color-red);
background: color-mix(in srgb, var(--color-red) 5%, var(--color-background-alt));
background: var(--bg-red-subtle);
}
swp-attention-item.urgent:hover {
background: color-mix(in srgb, var(--color-red) 8%, var(--color-background-alt));
background: var(--bg-red-medium);
}
/* Severity: Warning (amber) */
swp-attention-item.warning {
border-left-color: var(--color-amber);
background: color-mix(in srgb, var(--color-amber) 5%, var(--color-background-alt));
background: var(--bg-amber-subtle);
}
swp-attention-item.warning:hover {
background: color-mix(in srgb, var(--color-amber) 8%, var(--color-background-alt));
background: var(--bg-amber-medium);
}
/* Severity: Info (blue) */
@ -60,6 +61,7 @@ swp-attention-item.info {
/* ===========================================
ATTENTION ICON
=========================================== */
/* Base styling from swp-icon-container in components.css */
swp-attention-icon {
display: flex;
align-items: center;
@ -70,21 +72,22 @@ swp-attention-icon {
border-radius: var(--radius-xl);
color: var(--color-text-secondary);
font-size: var(--font-size-xl);
flex-shrink: 0;
}
/* Icon colors per severity */
swp-attention-item.urgent swp-attention-icon {
background: color-mix(in srgb, var(--color-red) 15%, transparent);
background: var(--bg-red-strong);
color: var(--color-red);
}
swp-attention-item.warning swp-attention-icon {
background: color-mix(in srgb, var(--color-amber) 15%, transparent);
background: var(--bg-amber-strong);
color: var(--color-amber);
}
swp-attention-item.info swp-attention-icon {
background: color-mix(in srgb, var(--color-blue) 15%, transparent);
background: var(--bg-blue-strong);
color: var(--color-blue);
}