mirror of
https://github.com/HKUDS/DeepTutor.git
synced 2026-12-05 00:50:12 +08:00
108 lines
2.8 KiB
CSS
108 lines
2.8 KiB
CSS
/*
|
|
* Learning-space surface.
|
|
*
|
|
* These names are kept because several components already speak them, but
|
|
* every one now resolves to a product design token. The previous version
|
|
* hardcoded a parchment palette (cream #f3ead7 paper, brown route, gold
|
|
* highlights) plus paper-grain noise and graph-paper ruling. It read as a
|
|
* cartoon treasure map rather than part of the product, and it could not
|
|
* follow a theme switch because the values were literals.
|
|
*
|
|
* The map's identity comes from its structure — a route, waypoints, and a
|
|
* visible progression — not from a skin. State is encoded by form (filled →
|
|
* ringed → outline) so it survives any palette, and there is no invented
|
|
* "success green": the product has no success token, only --primary.
|
|
*/
|
|
.mastery-shell {
|
|
--mastery-ink: var(--foreground);
|
|
--mastery-paper: var(--secondary);
|
|
--mastery-paper-raised: var(--card);
|
|
--mastery-route: var(--primary);
|
|
--mastery-moss: var(--primary);
|
|
--mastery-complete: var(--primary);
|
|
--mastery-water: var(--muted-foreground);
|
|
--mastery-gold: var(--primary);
|
|
background: var(--background);
|
|
}
|
|
|
|
.mastery-map-paper {
|
|
background-color: var(--mastery-paper);
|
|
color: var(--mastery-ink);
|
|
}
|
|
|
|
.mastery-route-line {
|
|
fill: none;
|
|
stroke: var(--border);
|
|
stroke-width: 2;
|
|
stroke-linecap: round;
|
|
stroke-dasharray: 1 7;
|
|
}
|
|
|
|
.mastery-route-travelled {
|
|
fill: none;
|
|
stroke: var(--mastery-route);
|
|
stroke-width: 2.5;
|
|
stroke-linecap: round;
|
|
}
|
|
|
|
.mastery-map-card {
|
|
transform: translateZ(0);
|
|
transition:
|
|
transform 220ms ease,
|
|
box-shadow 220ms ease,
|
|
border-color 220ms ease;
|
|
}
|
|
|
|
.mastery-map-card:hover {
|
|
transform: translateY(-2px);
|
|
box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08);
|
|
}
|
|
|
|
.mastery-waypoint-icon {
|
|
transition:
|
|
transform 160ms ease,
|
|
box-shadow 160ms ease,
|
|
border-color 160ms ease;
|
|
}
|
|
|
|
.mastery-waypoint:hover .mastery-waypoint-icon,
|
|
.mastery-waypoint:focus-visible .mastery-waypoint-icon {
|
|
transform: scale(1.06);
|
|
box-shadow:
|
|
0 0 0 3px var(--background),
|
|
0 0 0 5px var(--mastery-route);
|
|
}
|
|
|
|
.mastery-waypoint[data-current="true"] .mastery-waypoint-icon {
|
|
animation: mastery-pulse 2.4s ease-in-out infinite;
|
|
}
|
|
|
|
@keyframes mastery-pulse {
|
|
0%,
|
|
100% {
|
|
box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 18%, transparent);
|
|
}
|
|
50% {
|
|
box-shadow: 0 0 0 9px color-mix(in srgb, var(--primary) 4%, transparent);
|
|
}
|
|
}
|
|
|
|
.dark .mastery-map-card:hover,
|
|
.theme-glass .mastery-map-card:hover {
|
|
box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
|
|
}
|
|
|
|
@media (prefers-reduced-motion: reduce) {
|
|
.mastery-map-card,
|
|
.mastery-waypoint-icon {
|
|
animation: none !important;
|
|
transition-duration: 0.01ms !important;
|
|
}
|
|
|
|
.mastery-map-card:hover,
|
|
.mastery-waypoint:hover .mastery-waypoint-icon,
|
|
.mastery-waypoint:focus-visible .mastery-waypoint-icon {
|
|
transform: none;
|
|
}
|
|
}
|