Files
m3y54m_Embedded-Engineering…/explorer/map.css
T

679 lines
12 KiB
CSS

/* Map view: the roadmap diagram. */
.map-view {
position: absolute;
inset: 0;
display: grid;
grid-template-rows: auto minmax(0, 1fr);
}
.map-top {
position: relative;
z-index: 3;
padding: 8px 16px;
border-bottom: 1px solid var(--border);
background: var(--surface);
backdrop-filter: blur(12px);
}
.map-toolbar {
display: flex;
align-items: center;
gap: 8px;
}
.map-toolbar > * {
flex: none;
}
.map-chip {
display: inline-flex;
align-items: center;
gap: 6px;
min-height: 30px;
padding: 4px 12px;
border: 1px solid var(--border-strong);
border-radius: 999px;
background: var(--surface-2);
color: var(--text);
font-size: 13px;
font-weight: 600;
cursor: pointer;
transition: background 0.15s, border-color 0.15s;
}
.map-chip:hover {
border-color: var(--accent);
background: var(--chip-hover);
}
.map-chip > span {
display: inline-flex;
align-items: center;
gap: 7px;
}
.map-chip[aria-pressed="true"] {
border-color: var(--accent);
background: var(--accent);
color: var(--bg);
}
.filter-pill {
border-color: var(--accent);
background: color-mix(in srgb, var(--accent) 14%, var(--surface-2));
}
.pill-x {
margin-right: -3px;
color: var(--muted);
font-size: 11px;
}
.filter-pill:hover .pill-x {
color: var(--text);
}
.map-menu {
position: relative;
}
.menu-button {
list-style: none;
user-select: none;
}
.menu-button::-webkit-details-marker {
display: none;
}
.menu-button::after {
content: "";
width: 6px;
height: 6px;
margin: -3px 2px 0 2px;
border-right: 2px solid currentColor;
border-bottom: 2px solid currentColor;
transform: rotate(45deg);
transition: transform 0.15s;
}
.map-menu[open] > .menu-button::after {
margin-top: 3px;
transform: rotate(-135deg);
}
.map-menu[open] > .menu-button {
border-color: var(--accent);
}
.map-menu-panel {
position: absolute;
top: calc(100% + 8px);
left: 0;
display: grid;
gap: 8px;
width: max-content;
max-width: min(440px, calc(100vw - 24px));
max-height: min(70vh, 520px);
overflow-y: auto;
padding: 12px;
border: 1px solid var(--border);
border-radius: var(--radius);
background: var(--surface-solid);
box-shadow: var(--shadow);
}
.menu-list {
display: grid;
gap: 2px;
min-width: 260px;
}
.menu-item {
display: flex;
align-items: center;
gap: 10px;
padding: 7px 10px;
border: 0;
border-radius: 8px;
background: transparent;
color: var(--text);
font-size: 14px;
font-weight: 600;
text-align: left;
cursor: pointer;
}
.menu-item:hover,
.menu-item:focus-visible {
background: var(--chip-hover);
}
.menu-icon {
width: 1.4em;
text-align: center;
}
.map-summary {
margin-left: 4px;
color: var(--muted);
font-size: 12.5px;
}
.map-canvas {
position: relative;
min-height: 0;
}
.diagram {
display: block;
width: 100%;
height: 100%;
font-family: var(--font-display);
touch-action: none;
user-select: none;
cursor: grab;
}
.diagram.panning {
cursor: grabbing;
}
.page-bg {
fill: transparent;
}
.page-title {
fill: var(--text);
font-size: 34px;
font-weight: 900;
letter-spacing: -0.01em;
}
@media not print {
.page-title {
display: none;
}
}
.legend-text {
fill: var(--text);
font-size: 13px;
font-weight: 600;
}
.legend-caption {
fill: var(--muted);
font-size: 12.5px;
font-weight: 600;
}
.legend-info circle:first-child {
fill: none;
stroke: var(--muted);
stroke-width: 1.4;
}
.legend-info path {
fill: none;
stroke: var(--muted);
stroke-width: 1.6;
stroke-linecap: round;
}
.legend-info-dot {
fill: var(--muted);
stroke: var(--muted);
stroke-width: 1.2;
}
.legend-imp { stroke: var(--box-edge); stroke-width: 1; }
.legend-imp.required { fill: var(--imp-required); }
.legend-imp.recommended { fill: var(--imp-recommended); }
.legend-imp.possible { fill: var(--imp-possible); stroke: var(--border-strong); }
.legend-hit {
fill: transparent;
}
/* On screen the legend is the filter: each entry toggles a highlight. */
@media not print {
.legend-item {
cursor: pointer;
outline: none;
}
.legend-item:hover .legend-hit {
fill: var(--chip-hover);
}
.legend-item:focus-visible .legend-hit {
stroke: var(--accent);
stroke-width: 2;
}
.legend-item[aria-pressed="true"] .legend-hit {
fill: color-mix(in srgb, var(--accent) 16%, transparent);
stroke: var(--accent);
stroke-width: 1.5;
}
.page-legend.filtering .legend-item:not([aria-pressed="true"]) {
opacity: 0.45;
}
}
.area-fill {
stroke: none;
fill-opacity: var(--area-tint);
}
.area-fill.sw { fill: var(--sw); }
.area-fill.hw { fill: var(--hw); }
.area-fill.ss { fill: var(--ss); fill-opacity: calc(var(--area-tint) * 1.6); }
.area-line {
fill: none;
stroke-width: 3;
}
.area-line.sw { stroke: var(--sw); }
.area-line.hw { stroke: var(--hw); }
.area-line.ss { stroke: var(--ss); stroke-width: 2.5; }
.overlap-fill {
fill: url(#cross-hatch);
}
.hatch-a,
.hatch-b {
stroke-width: 2.4;
stroke-opacity: 0.2;
}
.hatch-a { stroke: var(--sw); }
.hatch-b { stroke: var(--hw); }
.band-label {
font-size: 12px;
font-weight: 800;
letter-spacing: 0.22em;
}
.band-label.sw { fill: var(--sw-text); }
.band-label.hw { fill: var(--hw-text); }
.band-label.both { fill: var(--text); }
.band-label.ss { fill: var(--ss-text); }
.group-line {
fill: none;
stroke-width: 2;
}
.group-line.g-os { stroke: var(--g-os); }
.group-line.g-mcu { stroke: var(--g-mcu); }
.group-line.g-ifc { stroke: var(--g-ifc); }
.tag-bg {
fill: var(--surface-solid);
stroke-width: 2;
}
.tag-text {
font-size: 14px;
font-weight: 800;
pointer-events: none;
}
.group-tag.g-os .tag-bg { stroke: var(--g-os); }
.group-tag.g-mcu .tag-bg { stroke: var(--g-mcu); }
.group-tag.g-ifc .tag-bg { stroke: var(--g-ifc); }
.group-tag.g-os .tag-text { fill: var(--g-os); }
.group-tag.g-mcu .tag-text { fill: var(--g-mcu); }
.group-tag.g-ifc .tag-text { fill: var(--g-ifc); }
.cluster-caption {
fill: var(--muted);
font-size: 11px;
font-weight: 800;
letter-spacing: 0.14em;
}
.box .box-bg {
stroke: var(--box-edge);
stroke-width: 1;
transition: filter 0.15s, stroke 0.15s;
}
.box.required .box-bg { fill: var(--imp-required); }
.box.recommended .box-bg { fill: var(--imp-recommended); }
.box.possible .box-bg { fill: var(--imp-possible); stroke: var(--border-strong); }
.box-text {
font-size: 14px;
font-weight: 600;
pointer-events: none;
}
.box.required .box-text { fill: var(--imp-required-text); }
.box.recommended .box-text { fill: var(--imp-recommended-text); }
.box.possible .box-text { fill: var(--imp-possible-text); }
.box .header-text {
fill: var(--text);
font-size: 15px;
font-weight: 800;
}
.target {
cursor: pointer;
outline: none;
}
.box.target:hover .box-bg,
.box.lit .box-bg {
filter: brightness(1.06);
stroke: var(--accent);
stroke-width: 2.2;
}
.header-bg {
fill: transparent;
transition: fill 0.15s;
}
.box.header.target:hover .header-bg,
.box.header.selected .header-bg {
fill: color-mix(in srgb, var(--accent) 14%, transparent);
}
.group-tag.target:hover .tag-bg {
fill: color-mix(in srgb, var(--surface-solid) 85%, var(--accent));
stroke-width: 3;
}
.box.selected .box-bg {
stroke: var(--text);
stroke-width: 3;
}
.box.target:focus-visible .box-bg,
.group-tag.target:focus-visible .tag-bg {
stroke: var(--accent);
stroke-width: 3.5;
}
.box.header.target:focus-visible .header-bg {
stroke: var(--accent);
stroke-width: 2;
}
.layer-boxes .box {
transition: opacity 0.2s;
}
.diagram.filtering .box:not(.match, .header) {
opacity: 0.15;
}
.diagram.has-focus:not(.filtering) .box:not(.lit, .header) {
opacity: 0.35;
}
.link,
.link-all {
fill: none;
stroke: var(--accent);
stroke-linecap: round;
pointer-events: none;
}
.link.evidence,
.link-all.evidence {
stroke-dasharray: 5 5;
stroke-opacity: 0.45;
}
.link-end {
fill: var(--accent);
}
.link-all {
stroke-opacity: 0.4;
}
.link-all.curated {
stroke-width: 1.2px;
stroke-opacity: 0.28;
}
.layer-linksAll {
opacity: 0;
transition: opacity 0.25s;
}
.diagram.show-all .layer-linksAll {
opacity: 1;
}
.diagram.show-all.has-focus .layer-linksAll {
opacity: 0.2;
}
.credit-main {
fill: var(--text);
font-size: 14px;
font-weight: 700;
}
.credit-text {
fill: var(--muted);
font-size: 12.5px;
font-weight: 600;
}
.credit-strong {
fill: var(--text);
font-weight: 800;
}
.credit-icon {
fill: var(--text);
}
.page-credits a:hover text {
text-decoration: underline;
}
.zoom-controls {
display: flex;
align-items: center;
gap: 2px;
margin-left: auto;
padding: 1px;
border: 1px solid var(--border-strong);
border-radius: 999px;
background: var(--surface-2);
}
.zoom-controls .icon-btn {
width: 26px;
height: 26px;
border: 0;
border-radius: 999px;
background: transparent;
font-size: 17px;
font-weight: 700;
}
.zoom-controls .icon-btn:hover {
background: var(--chip-hover);
}
.btn-icon {
display: block;
fill: none;
stroke: currentColor;
stroke-width: 2;
stroke-linecap: round;
stroke-linejoin: round;
}
.zoom-level {
min-width: 40px;
color: var(--muted);
font-size: 12px;
text-align: center;
font-variant-numeric: tabular-nums;
}
@media (max-width: 960px) {
.map-top {
padding: 6px 10px;
}
.map-toolbar {
gap: 6px;
}
.map-summary {
display: none;
}
/* Panels span the bar instead of hanging off their button, so they stay on screen. */
.map-menu {
position: static;
}
.map-menu-panel {
left: 10px;
right: 10px;
width: auto;
max-width: none;
}
.menu-list {
min-width: 0;
}
}
/* Phones pinch to zoom, so the bar keeps only the fit button. */
@media (max-width: 600px) {
.map-top {
padding: 6px 8px;
}
.map-toolbar {
gap: 4px;
}
.map-toolbar .map-chip {
padding: 4px 9px;
}
.zoom-controls .zoom-step,
.zoom-level,
.map-chip .label-long {
display: none;
}
}
@media (min-width: 601px) {
.map-chip .label-short {
display: none;
}
}
/* Printing: the diagram alone on an A4 page, in print colors. */
@page {
size: A4 portrait;
margin: 8mm;
}
@media print {
/* Print the final colors, not a frame of the screen-to-print color transition. */
*,
*::before,
*::after {
transition: none !important;
animation: none !important;
}
html[data-theme] {
color-scheme: light;
--bg: #ffffff;
--text: #0f172a;
--muted: #475569;
--surface-solid: #ffffff;
--border-strong: rgba(15, 23, 42, 0.35);
--chip-hover: #ffffff;
--accent: #3b4fd8;
--sw: #2b9fbf;
--hw: #e8a400;
--ss: #12b85a;
--sw-text: #0b6a85;
--hw-text: #8a5b00;
--ss-text: #0b7a3b;
--g-os: #6d4fb0;
--g-mcu: #b2453c;
--g-ifc: #4b5567;
--area-tint: 0.06;
--imp-required: #fff04a;
--imp-required-text: #1d1a00;
--imp-recommended: #fbd7bb;
--imp-recommended-text: #2b1407;
--imp-possible: #f1f3f6;
--imp-possible-text: #1f2937;
--box-edge: rgba(15, 23, 42, 0.75);
}
html,
body {
height: auto;
overflow: visible;
background: #ffffff;
print-color-adjust: exact;
-webkit-print-color-adjust: exact;
}
.topbar,
.panel,
.map-top,
.zoom-controls,
.tooltip,
#outline,
.status {
display: none !important;
}
.app,
.layout,
.stage,
.map-view,
.map-canvas {
display: block !important;
position: static !important;
height: auto !important;
overflow: visible !important;
}
.diagram {
width: 100%;
height: auto;
max-height: 280mm;
}
.diagram .box,
.diagram .box-bg {
opacity: 1 !important;
filter: none !important;
}
.layer-links,
.layer-linksAll {
display: none;
}
}