Files
Psychotoxical-psysonic/src/styles/components/np-dash.css
T
Frank Stellmacher 4b4cf42167 refactor(styles): split components.css into per-section files (#657)
components.css (14205 LOC) → 84 per-section files in src/styles/components/ +
an index.css that imports them in original cascade order.

Same approach as the theme.css split: top-level sections are detected by
single-dash or 3+ dash header decoration (/^\/\* ─(?: |─{2,})/), 2-dash
sub-sections stay inside their parent. Concatenating in @import order
reproduces the original byte stream (+1 trailing newline, cosmetic).

Each section is now self-contained — touching Tracklist, Modal, Hero,
Sidebar, etc. only opens one focused file.

Generated via /tmp/split-components-css.mjs.
2026-05-13 19:10:11 +02:00

718 lines
15 KiB
CSS

/* ────────────────────────────────────────────────────────────────────────── */
.np-dash {
display: flex;
flex-direction: column;
gap: 18px;
min-width: 0;
}
.np-dash-hero {
display: grid;
grid-template-columns: auto 1fr;
gap: 28px;
padding: 28px;
background: rgba(0, 0, 0, 0.30);
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
border-radius: var(--radius-lg);
border: 1px solid rgba(255, 255, 255, 0.08);
align-items: center;
}
.np-dash-hero-cover {
width: 260px;
height: 260px;
flex-shrink: 0;
display: flex;
align-items: center;
justify-content: center;
border-radius: var(--radius-md);
overflow: hidden;
box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}
.np-dash-hero-cover .np-cover {
width: 100%;
height: 100%;
object-fit: cover;
display: block;
}
.np-dash-hero-body {
min-width: 0;
display: flex;
flex-direction: column;
gap: 12px;
}
.np-dash-hero-title {
font-size: 30px;
font-weight: 700;
letter-spacing: -0.015em;
line-height: 1.15;
color: var(--accent);
overflow-wrap: anywhere;
}
.np-dash-hero-sub {
font-size: 15px;
color: rgba(255, 255, 255, 0.78);
display: flex;
flex-wrap: wrap;
gap: 8px;
align-items: baseline;
}
.np-dash-hero-sub .np-link { color: inherit; }
.np-dash-hero-sub .np-link:hover { color: var(--accent); }
.np-dash-hero-badges {
display: flex;
flex-wrap: wrap;
gap: 6px;
align-items: center;
}
.np-badge-hires {
background: color-mix(in srgb, var(--ctp-yellow) 30%, transparent);
color: var(--ctp-yellow);
font-weight: 700;
letter-spacing: 0.05em;
}
.np-dash-hero-actions {
display: flex;
align-items: center;
gap: 8px;
margin-top: 2px;
}
.np-dash-icon-btn {
background: none;
border: none;
cursor: pointer;
padding: 6px;
display: inline-flex;
align-items: center;
justify-content: center;
color: rgba(255, 255, 255, 0.65);
border-radius: var(--radius-sm);
transition: color 0.15s, background 0.15s;
}
.np-dash-icon-btn:hover {
color: var(--accent);
background: rgba(255, 255, 255, 0.06);
}
.np-dash-lfm-btn.is-loved {
color: var(--accent);
}
.np-stars-inline {
display: inline-flex;
gap: 3px;
align-items: center;
margin-left: 4px;
}
.np-dash-hero-stat {
display: inline-flex;
align-items: center;
gap: 6px;
font-size: 12px;
color: var(--text-secondary);
opacity: 0.85;
}
/* Last.fm stats pulled up into the hero */
.np-dash-hero-lfm {
display: flex;
flex-direction: column;
gap: 5px;
margin-top: 8px;
padding: 12px 14px;
background: rgba(255, 255, 255, 0.04);
border-radius: var(--radius-md);
border-left: 3px solid var(--accent);
}
.np-dash-hero-lfm-heading {
display: flex;
align-items: center;
gap: 8px;
margin-bottom: 2px;
}
.np-dash-hero-lfm-badge {
font-size: 10px;
font-weight: 800;
letter-spacing: 0.12em;
text-transform: uppercase;
color: var(--accent);
}
.np-dash-hero-lfm-row {
display: flex;
flex-wrap: wrap;
align-items: baseline;
gap: 6px;
font-size: 13px;
color: rgba(255, 255, 255, 0.78);
font-variant-numeric: tabular-nums;
}
.np-dash-hero-lfm-scope {
font-weight: 600;
color: rgba(255, 255, 255, 0.92);
}
.np-dash-hero-lfm-sep {
color: rgba(255, 255, 255, 0.35);
padding: 0 2px;
}
.np-dash-hero-lfm-dot {
color: rgba(255, 255, 255, 0.30);
padding: 0 3px;
}
.np-dash-hero-lfm-you {
color: var(--accent);
font-weight: 600;
}
/* Widget layout toolbar (layout / hidden-cards menu) */
.np-dash-toolbar {
display: flex;
justify-content: flex-end;
margin-bottom: -4px;
}
.np-dash-toolbar-menu-wrap {
position: relative;
}
.np-dash-toolbar-btn {
display: inline-flex;
align-items: center;
gap: 6px;
background: rgba(255, 255, 255, 0.06);
color: rgba(255, 255, 255, 0.75);
border: 1px solid rgba(255, 255, 255, 0.08);
border-radius: var(--radius-sm);
padding: 6px 10px;
font-size: 12px;
cursor: pointer;
transition: background 0.15s, color 0.15s;
}
.np-dash-toolbar-btn:hover {
background: rgba(255, 255, 255, 0.10);
color: var(--accent);
}
.np-dash-toolbar-badge {
background: var(--accent);
color: var(--ctp-base, #1e1e2e);
font-size: 10px;
font-weight: 700;
padding: 1px 6px;
border-radius: 999px;
min-width: 14px;
text-align: center;
line-height: 1.3;
}
.np-dash-toolbar-menu {
position: absolute;
top: calc(100% + 4px);
right: 0;
min-width: 220px;
background: var(--ctp-base, #1e1e2e);
border: 1px solid rgba(255, 255, 255, 0.10);
border-radius: var(--radius-md);
padding: 6px;
z-index: 50;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
.np-dash-toolbar-section {
font-size: 10px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.08em;
color: rgba(255, 255, 255, 0.45);
padding: 6px 8px 4px;
}
.np-dash-toolbar-empty {
padding: 8px 10px;
font-size: 12px;
color: rgba(255, 255, 255, 0.50);
font-style: italic;
}
.np-dash-toolbar-item {
display: flex;
align-items: center;
gap: 8px;
width: 100%;
background: none;
border: none;
cursor: pointer;
color: rgba(255, 255, 255, 0.85);
font-size: 12.5px;
padding: 7px 10px;
border-radius: var(--radius-sm);
text-align: left;
transition: background 0.1s;
}
.np-dash-toolbar-item:hover {
background: rgba(255, 255, 255, 0.08);
color: var(--accent);
}
.np-dash-toolbar-divider {
height: 1px;
margin: 4px 0;
background: rgba(255, 255, 255, 0.08);
}
/* Widget wrapper — makes each card a psyDnD drag source */
.np-dash-card-wrap {
position: relative;
cursor: grab;
}
.np-dash-col.is-dnd-active .np-dash-card-wrap {
transition: transform 0.15s;
}
.np-dash-col.is-drop-target {
background: rgba(255, 255, 255, 0.02);
border-radius: var(--radius-lg);
outline: 1px dashed rgba(255, 255, 255, 0.10);
outline-offset: 4px;
}
.np-dash-toolbar-item-label { flex: 1; min-width: 0; }
.np-dash-toolbar-item.is-hidden .np-dash-toolbar-item-label { opacity: 0.55; }
/* Drop indicator — accent line between cards while dragging */
.np-dash-drop-indicator {
height: 3px;
border-radius: 2px;
background: var(--accent);
box-shadow: 0 0 10px color-mix(in srgb, var(--accent) 60%, transparent);
margin: -8px 0;
}
/* Empty column placeholder */
.np-dash-col-empty {
padding: 28px 18px;
text-align: center;
font-size: 12.5px;
color: rgba(255, 255, 255, 0.40);
border: 1px dashed rgba(255, 255, 255, 0.10);
border-radius: var(--radius-lg);
font-style: italic;
}
/* Two flex columns — left stack, right stack */
.np-dash-grid {
display: flex;
gap: 18px;
align-items: stretch; /* equal-height columns so drops below the last card still hit the column */
}
.np-dash-col {
flex: 1 1 0;
min-width: 0;
display: flex;
flex-direction: column;
gap: 18px;
/* Ensures the area below the last card still belongs to this column — needed
so the user can drop a card "at the very bottom" even when the other
column is taller. */
min-height: 120px;
}
.np-dash-card {
min-width: 0;
}
/* Expanded bio grows the card naturally instead of turning into a scroll box */
.np-dash-artist-text .np-bio-text.expanded {
max-height: none;
overflow: visible;
}
/* Artist card */
.np-dash-artist-body {
display: flex;
gap: 16px;
align-items: flex-start;
}
.np-dash-artist-image {
width: 92px;
height: 92px;
border-radius: var(--radius-md);
object-fit: cover;
flex-shrink: 0;
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}
.np-dash-artist-text {
flex: 1;
min-width: 0;
display: flex;
flex-direction: column;
gap: 6px;
}
.np-dash-artist-name {
font-size: 16px;
font-weight: 600;
color: rgba(255, 255, 255, 0.92);
}
.np-dash-similar {
margin-top: 4px;
}
.np-dash-chip-row {
display: flex;
flex-wrap: wrap;
gap: 6px;
}
.np-chip {
font-size: 12px;
font-weight: 500;
padding: 4px 10px;
border-radius: 999px;
background: rgba(255, 255, 255, 0.08);
color: rgba(255, 255, 255, 0.75);
cursor: pointer;
transition: background 0.15s, color 0.15s;
white-space: nowrap;
}
.np-chip:hover {
background: color-mix(in srgb, var(--accent) 30%, transparent);
color: white;
}
/* Album card meta line */
.np-dash-album-meta {
display: flex;
flex-wrap: wrap;
align-items: baseline;
gap: 8px;
font-size: 12.5px;
color: rgba(255, 255, 255, 0.70);
}
.np-dash-album-name {
font-weight: 600;
color: rgba(255, 255, 255, 0.88);
}
.np-dash-album-stats {
display: inline-flex;
flex-wrap: wrap;
gap: 6px;
align-items: baseline;
}
/* Top songs card */
.np-dash-top-list {
display: flex;
flex-direction: column;
gap: 2px;
}
.np-dash-top-row {
display: grid;
grid-template-columns: 28px 1fr auto 16px;
align-items: center;
gap: 10px;
padding: 8px 10px;
border-radius: var(--radius-sm);
cursor: pointer;
transition: background 0.12s;
}
.np-dash-top-row:hover {
background: rgba(255, 255, 255, 0.07);
}
.np-dash-top-row.active {
background: rgba(255, 255, 255, 0.10);
}
.np-dash-top-rank {
font-size: 12px;
font-weight: 700;
color: rgba(255, 255, 255, 0.45);
font-variant-numeric: tabular-nums;
text-align: right;
}
.np-dash-top-row.active .np-dash-top-rank {
color: var(--accent);
}
.np-dash-top-body {
min-width: 0;
display: flex;
flex-direction: column;
gap: 1px;
}
.np-dash-top-title {
font-size: 13px;
color: rgba(255, 255, 255, 0.88);
}
.np-dash-top-row.active .np-dash-top-title {
color: var(--accent);
font-weight: 600;
}
.np-dash-top-sub {
font-size: 11px;
color: rgba(255, 255, 255, 0.50);
}
.np-dash-top-dur {
font-size: 12px;
font-variant-numeric: tabular-nums;
color: rgba(255, 255, 255, 0.60);
}
.np-dash-top-play {
color: rgba(255, 255, 255, 0.35);
transition: color 0.15s;
}
.np-dash-top-row:hover .np-dash-top-play {
color: var(--accent);
}
.np-dash-top-credit {
font-size: 11px;
color: rgba(255, 255, 255, 0.40);
margin-top: 2px;
}
/* Info-only tracklist inside the dashboard: no cursor, no hover background */
.np-dash-card .np-album-track { cursor: default; }
.np-dash-card .np-album-track:hover:not(.active) { background: transparent; }
/* Tracklist expand toggle */
.np-dash-tracklist-more {
background: none;
border: none;
cursor: pointer;
font-size: 12px;
color: var(--accent);
padding: 6px 8px;
align-self: flex-start;
opacity: 0.85;
transition: opacity 0.15s;
}
.np-dash-tracklist-more:hover { opacity: 1; }
/* Hero age + ReplayGain badge */
.np-dash-hero-age {
font-style: italic;
opacity: 0.65;
}
/* Discography grid — compact contact-sheet of covers, title/year shown on hover via tooltip */
.np-dash-disc-grid {
display: grid;
grid-template-columns: repeat(10, minmax(0, 1fr));
gap: 6px;
}
.np-dash-disc-tile {
cursor: pointer;
min-width: 0;
transition: transform 0.15s;
}
.np-dash-disc-tile:hover { transform: none; }
.np-dash-disc-cover {
aspect-ratio: 1 / 1;
border-radius: var(--radius-sm);
overflow: hidden;
background: rgba(255, 255, 255, 0.04);
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
position: relative;
}
.np-dash-disc-tile.active .np-dash-disc-cover {
box-shadow: 0 0 0 2px var(--accent), 0 3px 10px rgba(0, 0, 0, 0.4);
}
.np-dash-disc-img {
width: 100%;
height: 100%;
object-fit: cover;
display: block;
}
.np-dash-disc-fallback {
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
color: rgba(255, 255, 255, 0.30);
}
/* Last.fm stats */
.np-dash-stats-row {
display: flex;
flex-direction: column;
gap: 6px;
}
.np-dash-stats-row + .np-dash-stats-row {
margin-top: 4px;
padding-top: 12px;
border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.np-dash-stats-label {
font-size: 11px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.08em;
color: rgba(255, 255, 255, 0.45);
}
.np-dash-stats-values {
display: flex;
gap: 22px;
flex-wrap: wrap;
}
.np-dash-stat {
display: flex;
flex-direction: column;
gap: 2px;
min-width: 60px;
}
.np-dash-stat-value {
font-size: 20px;
font-weight: 700;
color: rgba(255, 255, 255, 0.92);
letter-spacing: -0.01em;
font-variant-numeric: tabular-nums;
}
.np-dash-stat-you .np-dash-stat-value {
color: var(--accent);
}
.np-dash-stat-sub {
font-size: 11px;
color: rgba(255, 255, 255, 0.50);
text-transform: lowercase;
}
.np-dash-stats-links {
display: flex;
gap: 16px;
flex-wrap: wrap;
margin-top: 2px;
}
/* Responsive: single column on narrow viewports */
@media (max-width: 900px) {
.np-dash-grid { flex-direction: column; }
.np-dash-hero { grid-template-columns: 1fr; }
.np-dash-hero-cover { width: 180px; height: 180px; margin: 0 auto; }
.np-dash-hero-title { font-size: 24px; }
}
/* Prefer container-based adaptation (main-content width can be narrow on desktop). */
@container (max-width: 900px) {
.np-dash-grid {
flex-direction: column;
gap: 14px;
align-items: stretch;
}
.np-dash-col {
flex: 0 0 auto;
width: 100%;
min-height: 0;
gap: 14px;
}
.np-dash-card-wrap {
display: block;
width: 100%;
}
.np-dash-card,
.np-info-card {
min-width: 0;
overflow: hidden;
}
.np-dash-hero {
grid-template-columns: 1fr;
gap: 16px;
padding: 20px;
align-items: stretch;
}
.np-dash-hero-cover {
width: 180px;
height: 180px;
margin: 0 auto;
}
.np-dash-hero-body {
gap: 10px;
}
.np-dash-hero-title {
font-size: 24px;
line-height: 1.2;
overflow-wrap: break-word;
}
.np-dash-hero-sub,
.np-dash-hero-lfm-row {
font-size: 13px;
}
.np-dash-hero-actions {
flex-wrap: wrap;
}
}
@container (max-width: 760px) {
.np-main__viewport {
padding: 16px 14px 24px;
gap: 12px;
}
.np-dash {
gap: 12px;
}
.np-dash-hero {
padding: 14px;
gap: 12px;
}
.np-dash-hero-cover {
width: 150px;
height: 150px;
}
.np-dash-hero-title {
font-size: 21px;
overflow-wrap: anywhere;
}
.np-dash-hero-sub {
gap: 5px;
}
.np-dash-hero-lfm {
padding: 10px 11px;
}
.np-info-card {
padding: 14px 15px;
}
.np-card-header {
flex-wrap: wrap;
align-items: flex-start;
}
.np-dash-col {
gap: 12px;
}
}
.app-shell[data-mobile] .np-dash-grid { flex-direction: column; }
.app-shell[data-mobile] .np-dash-hero { grid-template-columns: 1fr; }
.app-shell[data-mobile] .np-dash-hero-cover { width: 160px; height: 160px; margin: 0 auto; }
.app-shell[data-mobile] .np-dash-hero-title { font-size: 22px; }
.app-shell[data-mobile] .np-dash-artist-body { flex-direction: column; }
.app-shell[data-mobile] .np-dash-artist-image { width: 72px; height: 72px; }
.app-shell[data-mobile] .np-dash-disc-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 1100px) {
.np-dash-disc-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
.np-dash-disc-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.np-dash-stats-values { gap: 16px; }
.np-dash-stat-value { font-size: 18px; }
}