Modul:SystemMap/styles.css
Aus Star Citizen Wiki
Weitere Optionen
/* Module:SystemMap — horizontal orbit rail for {{System map}}.
*
* Geometry contract: every disc is centred in a 32px box, so the horizontal
* rail line (top: 16px) and the vertical moon connectors (left: 16px) pass
* exactly through disc centres at every tier. Change 32/16 together or not
* at all.
*
* Disc diameters are NOT set here — Module:SystemMap/Renderer emits them inline
* per body, log-scaled within each tier by Module:SystemMap/Data. That is
* rank-preserving, not proportional: planets span 472:1, so a true-scale map
* would put the smallest at 0.05px. Gas and ice giants are additionally
* distinguished by gradient banding rather than by diameter alone. */
/* The card frame, header row, collapse affordance and chevron all come from
Module:CollapsibleCard — this sheet styles only the rail inside it. */
/* Wide rails scroll inside their own container so the article body never
scrolls sideways. Pyro is the widest at six columns. */
.t-system-map__scroll {
/* Declared here, not on an ancestor: this element and every var() consumer
below are emitted by Module:SystemMap/Renderer, so no wrapper change
elsewhere can orphan them. They previously sat on a root a different module
owned, which silently voided the whole 32/16 contract. */
--t-system-map-track: 32px;
--t-system-map-centre: 16px;
overflow-x: auto;
padding: var(--space-md) var(--space-sm) var(--space-sm);
}
.t-system-map__rail {
position: relative;
display: flex;
align-items: flex-start;
gap: var(--space-md);
width: max-content;
min-width: 100%;
margin: 0;
padding: 0;
list-style: none;
}
/* The orbit line is drawn as one segment per body rather than a single line
across the rail, so it stops at the last body instead of running past it and
implying the system continues. Each segment spans from its own body's centre
to the next one's; the last body has no segment. Direct children only —
moons sit in their own nested list and must not draw rail segments. */
.t-system-map__rail > .t-system-map__item:not(:last-child)::after {
content: '';
position: absolute;
left: var(--t-system-map-centre);
right: calc(0px - var(--space-md) - var(--t-system-map-centre));
top: var(--t-system-map-centre);
height: 1px;
background: var(--border-color-base);
}
.t-system-map__item {
position: relative;
margin: 0;
padding: 0;
list-style: none;
}
/* Equal columns. `width: max-content` + `min-width: 100%` on the rail means it
is at least the container width, so when the content is narrower there IS
free space for flex to distribute, and when it overflows there is none and
__scroll takes over. The min-width is the floor that triggers that handover.
Even spacing is also the honest choice: horizontal position here is orbital
ORDER, not distance. Orbital distance is derivable (Kepler, from the periods
upstream stores) but ranges 20:1 in Pyro, which would collide its three inner
planets — and irregular gaps would imply a precision the layout does not have.
--rail-moon is a moon holding a rail slot, because upstream parents it to the
star and it has no planet to nest under. It is laid out as a column like every
other rail child; only its glyph and its size come from the moon tier.
Spelled out rather than matched on `.t-system-map__rail > .t-system-map__item`,
which would be the same set today: the child combinator is not what the rule
means, and a nested list arriving later would silently opt in. */
.t-system-map__item--star,
.t-system-map__item--planet,
.t-system-map__item--belt,
.t-system-map__item--rail-moon {
flex: 1 1 0;
min-width: 7.5rem;
}
/* Vertical connector from a planet down through its moon column. Keyed off the
--has-moons modifier Renderer.lua emits rather than matching structurally:
the :has pseudo-class is not in TemplateStyles' allowlist, and an
unrecognised selector makes the whole sheet fail to save. */
.t-system-map__item--has-moons::before {
content: '';
position: absolute;
left: var(--t-system-map-centre);
top: var(--t-system-map-track);
bottom: var(--space-sm);
width: 1px;
background: var(--border-color-base);
}
.t-system-map__node {
position: relative;
z-index: 1;
display: flex;
flex-direction: column;
align-items: flex-start;
gap: var(--space-xxs);
}
.t-system-map__glyph {
flex: none;
display: flex;
align-items: center;
justify-content: center;
inline-size: var(--t-system-map-track);
block-size: var(--t-system-map-track);
}
.t-system-map__disc {
display: block;
border-radius: var(--border-radius-circle);
/* Ring in the surface colour punches the disc out of the rail line. */
box-shadow: 0 0 0 3px var(--color-surface-1);
background: radial-gradient(circle at 32% 28%, oklch(78% 0.01 250), oklch(63% 0.012 250) 58%, oklch(45% 0.014 250));
}
.t-system-map__label {
display: flex;
flex-direction: column;
}
.t-system-map__name {
font-size: var(--font-size-small);
line-height: var(--line-height-small);
font-weight: var(--font-weight-medium);
}
/* Formal designations run long on belts ("Stanton Belt Alpha") — far longer
than a planet's "Stanton II". Wrap inside the column rather than letting the
text set the column's width, which is what happened while belts sat outside
the flex distribution. */
.t-system-map__desig {
overflow-wrap: anywhere;
color: var(--color-subtle);
font-family: var(--font-family-monospace);
font-size: var(--font-size-x-small);
line-height: var(--line-height-x-small);
}
.t-system-map__moons {
display: flex;
flex-direction: column;
gap: var(--space-xxs);
margin: var(--space-xs) 0 0;
padding: 0;
list-style: none;
}
/* Moons are a row: disc sitting on the connector, label to its right. A ring
hangs in the same column and takes the same row layout — it is only the glyph
that differs, because a ring is not a body. A nested companion star hangs
there too: it orbits the primary the way a moon orbits a planet, so it is
drawn where one is. Spelled out rather than matched with :is(), which is not
in TemplateStyles' allowlist and fails the save. */
.t-system-map__item--moon .t-system-map__node,
.t-system-map__item--ring .t-system-map__node,
.t-system-map__item--companion .t-system-map__node {
flex-direction: row;
align-items: center;
gap: var(--space-xxs);
}
.t-system-map__item--moon .t-system-map__label,
.t-system-map__item--ring .t-system-map__label,
.t-system-map__item--companion .t-system-map__label {
flex-direction: row;
align-items: baseline;
gap: var(--space-xs);
}
/* Two stars sharing one head slot, for the three systems where neither is
parented to the other and the planets co-orbit both. They sit side by side and
BOTH on the orbit line, which is what says neither dominates — stacking them
would draw the same picture as a nested companion and make the opposite
claim.
The slot is a single rail child, so the orbit line drawn by the rail begins at
the pair rather than at either star, and runs on behind both. Each star keeps
its own <li> inside, which is what carries its own data-kind (Bacchus A is a
G-type and B a K-type) and its own you-are-here marker: they are separate
articles, and a reader on either has to be able to find themselves. */
.t-system-map__pair {
display: flex;
align-items: flex-start;
/* Tighter than the rail's own gap, and deliberately so. At --space-sm the two
stars sat 12px apart against the rail's 16px, and 4px is not enough
difference to read as one unit — the pair looked like two consecutive rail
slots, which is the one thing this layout must not say, because left-to-right
on the rail means orbital order. Halving it binds the pair visually. */
gap: var(--space-xs);
margin: 0;
padding: 0;
list-style: none;
}
/* A floor for two star columns rather than one. It must come after the
--star/--planet/--belt rule above, which it widens. */
.t-system-map__item--pair {
min-width: 10.5rem;
}
/* The bond between the two: from the first star's centre to the second's.
The rail already draws a line through both on a wide viewport, so this is
invisible there — but under 720px the rail line turns vertical and would leave
the second star floating unattached, which is exactly the "these two are one
head" claim the pair exists to make. */
.t-system-map__pair > .t-system-map__item:first-child::after {
content: '';
position: absolute;
left: var(--t-system-map-centre);
right: calc(0px - var(--space-xs) - var(--t-system-map-centre));
top: var(--t-system-map-centre);
height: 1px;
background: var(--border-color-base);
}
/* Body palette. Semantic, and deliberately separate from the Citizen link
accent: these encode what a body is, not UI state. */
.t-system-map__item[data-kind='star-g'] .t-system-map__disc {
background: radial-gradient(circle at 38% 32%, oklch(98% 0.03 95), oklch(87% 0.13 85) 52%, oklch(74% 0.16 68) 100%);
}
.t-system-map__item[data-kind='star-k'] .t-system-map__disc {
background: radial-gradient(circle at 38% 32%, oklch(96% 0.04 70), oklch(80% 0.14 58) 52%, oklch(66% 0.16 45) 100%);
}
.t-system-map__item[data-kind='star-f'] .t-system-map__disc {
background: radial-gradient(circle at 38% 32%, oklch(99% 0.005 250), oklch(91% 0.04 250) 52%, oklch(78% 0.07 258) 100%);
}
/* The rest of the spectral sequence. F, G and K are above rather than in
sequence here because they were styled first and are live on 42 pages; their
declarations must not move even by a reformat. The full ladder is O
blue-violet, B blue-white, A white, F yellow-white, G yellow, K orange, M red,
with the two degenerate remnants after it.
Blue cannot be both light and saturated in sRGB, so O and B carry their colour
in the rim while G and K carry it in the body. That is not a stylistic choice;
it is where the gamut is. */
.t-system-map__item[data-kind='star-o'] .t-system-map__disc {
background: radial-gradient(circle at 38% 32%, oklch(96% 0.014 285), oklch(76% 0.12 282) 52%, oklch(60% 0.2 280) 100%);
}
.t-system-map__item[data-kind='star-b'] .t-system-map__disc {
background: radial-gradient(circle at 38% 32%, oklch(98% 0.01 250), oklch(86% 0.07 248) 52%, oklch(70% 0.15 252) 100%);
}
/* A is white. F above sits in the same hue family, so the separation has to come
from chroma: F carries roughly three times as much and reads as blue-white,
while A is near-neutral. They are adjacent classes, so a small difference is
also the honest one — but it does have to be visible at 22px, and at F's
original chroma it was not. */
.t-system-map__item[data-kind='star-a'] .t-system-map__disc {
background: radial-gradient(circle at 38% 32%, oklch(99% 0.004 258), oklch(96% 0.012 258) 52%, oklch(84% 0.028 255) 100%);
}
.t-system-map__item[data-kind='star-m'] .t-system-map__disc {
background: radial-gradient(circle at 38% 32%, oklch(92% 0.037 45), oklch(73% 0.16 32) 52%, oklch(57% 0.19 25) 100%);
}
/* White dwarf. Also white, but pulled to cyan (hue 220) rather than A's blue
(hue 258) so the two do not collide — and it always renders at the star tier's
floor, because its diameter genuinely is the smallest in the file. */
.t-system-map__item[data-kind='star-degenerate'] .t-system-map__disc {
background: radial-gradient(circle at 38% 32%, oklch(98% 0.012 220), oklch(90% 0.055 222) 52%, oklch(74% 0.13 228) 100%);
}
/* The brightest thing on any map: near-white almost to the rim. The violet edge
is doing two jobs — holding the disc against a light surface, where a white
body on white would otherwise disappear, and keeping it clear of star-a, which
is also white but near-neutral. */
.t-system-map__item[data-kind='star-neutron'] .t-system-map__disc {
background: radial-gradient(circle at 38% 32%, oklch(98% 0.008 300), oklch(95% 0.026 296) 52%, oklch(72% 0.155 292) 100%);
}
/* The darkest thing on any map, and the only disc that is mostly hole: a near-black
centre sitting inside a thin warm accretion rim. The rim is load-bearing the same
way star-neutron's violet edge is - a black disc on the rail's dark background
would read as a missing glyph without it. */
.t-system-map__item[data-kind='star-blackhole'] .t-system-map__disc {
background: radial-gradient(circle at 38% 32%, oklch(14% 0.015 55), oklch(11% 0.012 55) 60%, oklch(58% 0.13 52) 90%, oklch(70% 0.145 50) 100%);
}
.t-system-map__item[data-kind='super-earth'] .t-system-map__disc {
background: radial-gradient(circle at 32% 28%, oklch(78% 0.05 120), oklch(63% 0.06 118) 56%, oklch(44% 0.05 118) 100%);
}
.t-system-map__item[data-kind='gas-giant'] .t-system-map__disc {
background: repeating-linear-gradient(
174deg,
rgba(255, 255, 255, 0.16) 0,
rgba(255, 255, 255, 0.16) 2px,
rgba(0, 0, 0, 0.11) 2px,
rgba(0, 0, 0, 0.11) 4px
),
radial-gradient(circle at 32% 28%, oklch(86% 0.07 75), oklch(71% 0.1 68) 56%, oklch(52% 0.09 62) 100%);
}
.t-system-map__item[data-kind='ice-giant'] .t-system-map__disc {
background: repeating-linear-gradient(
174deg,
rgba(255, 255, 255, 0.14) 0,
rgba(255, 255, 255, 0.14) 2px,
rgba(0, 0, 0, 0.08) 2px,
rgba(0, 0, 0, 0.08) 4px
),
radial-gradient(circle at 32% 28%, oklch(92% 0.04 220), oklch(78% 0.07 225) 56%, oklch(58% 0.07 230) 100%);
}
.t-system-map__item[data-kind='smog'] .t-system-map__disc {
background: radial-gradient(circle at 32% 28%, oklch(84% 0.06 85), oklch(67% 0.07 82) 56%, oklch(48% 0.06 80) 100%);
}
.t-system-map__item[data-kind='protoplanet'] .t-system-map__disc {
background: radial-gradient(circle at 32% 28%, oklch(78% 0.008 250), oklch(63% 0.01 250) 56%, oklch(45% 0.012 250) 100%);
}
.t-system-map__item[data-kind='rocky'] .t-system-map__disc {
background: radial-gradient(circle at 32% 28%, oklch(80% 0.035 60), oklch(64% 0.04 55) 56%, oklch(45% 0.038 52) 100%);
}
/* Surfaces distinctive enough to earn a colour of their own. Each is well clear
of `rocky` in chroma, which is what keeps the terrestrial family reading as
one thing and these as exceptions to it. */
.t-system-map__item[data-kind='lava'] .t-system-map__disc {
background: radial-gradient(circle at 32% 28%, oklch(85% 0.105 65), oklch(64% 0.19 42) 56%, oklch(43% 0.15 30) 100%);
}
/* Pale cyan and unbanded, against `ice-giant`'s banded hue 225. Same idea, two
very different bodies. */
.t-system-map__item[data-kind='ice'] .t-system-map__disc {
background: radial-gradient(circle at 32% 28%, oklch(96% 0.03 200), oklch(87% 0.055 200) 56%, oklch(64% 0.08 205) 100%);
}
.t-system-map__item[data-kind='ocean'] .t-system-map__disc {
background: radial-gradient(circle at 32% 28%, oklch(72% 0.09 240), oklch(54% 0.13 250) 56%, oklch(35% 0.11 255) 100%);
}
/* The third grey. `moon` and `protoplanet` are both cool near-neutrals separated
only by lightness, so a dwarf planet is separated on BOTH axes — darker again,
and warm rather than cool. Low albedo is also what these bodies actually are.
Chroma stays an order below `rocky`'s so it never reads as tan. */
.t-system-map__item[data-kind='dwarf'] .t-system-map__disc {
background: radial-gradient(circle at 32% 28%, oklch(70% 0.013 90), oklch(54% 0.015 85) 56%, oklch(38% 0.015 80) 100%);
}
/* Artificial, rogue and evaporating bodies. Violet appears nowhere else at the
planet tier, and no natural surface is this colour — which is the point: it
reads as "something is off about this one" rather than as a material. */
.t-system-map__item[data-kind='exotic'] .t-system-map__disc {
background: radial-gradient(circle at 32% 28%, oklch(76% 0.14 320), oklch(58% 0.17 315) 56%, oklch(38% 0.14 310) 100%);
}
.t-system-map__item[data-kind='moon'] .t-system-map__disc {
background: radial-gradient(circle at 32% 28%, oklch(84% 0.006 250), oklch(70% 0.008 250) 56%, oklch(50% 0.01 250) 100%);
}
/* An asteroid belt is a region, not a body: upstream reports its size as 0 or
null, and giving it a diameter would invent data. A speckled band that the
orbit line runs through says "somewhere you cross" instead. */
.t-system-map__item--belt .t-system-map__disc {
border-radius: 2px;
box-shadow: none;
background: transparent;
background-image: radial-gradient(circle, var(--color-subtle) 1.1px, transparent 1.4px);
background-size: 5px 5px;
background-position: center;
}
/* A planetary ring, hanging in the moon column of the planet it circles. It
borrows the belt's speckle — both are debris you look through rather than at —
and turns it on its side: wide, shallow, and flat, the way a ring reads seen
edge-on. Finer dots on a smaller pitch than the belt band, because the glyph is
a third the height and the belt's 5px grid would land only one row of them.
Keyed on the kind rather than the tier class, like the rest of the palette,
because what separates a ring from the moons beside it is entirely what it is —
the geometry it shares with them. It carries no diameter for the same reason a
belt does not: a ring is a region, and upstream reports 0 or null for all
eleven of them. */
.t-system-map__item[data-kind='ring'] .t-system-map__disc {
border-radius: 2px;
box-shadow: none;
background: transparent;
background-image: radial-gradient(circle, var(--color-subtle) 0.8px, transparent 1.1px);
background-size: 3px 3px;
background-position: center;
}
/* A body with a wiki render uses it instead of the procedural disc. The image
is sized by height in the Renderer (x<N>px), so a ringed body like Terminus
keeps its planet at the tier's diameter while the rings extend past the 32px
track. Overflow is deliberate — the column is far wider than the track. */
.t-system-map__glyph--image {
overflow: visible;
}
.t-system-map__glyph--image img {
display: block;
max-width: none;
}
/* Visually hidden, still read aloud. Carries "you are here" to assistive
technology, since the ring and dot below are CSS-only and aria-current is
stripped by MediaWiki's sanitizer. */
.t-system-map__sr {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
padding: 0;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
}
/* You-are-here. Bolder, brighter, and a trailing dot — never colour alone.
Deliberately no ring around the glyph: most bodies render as an image, and a
circle looks wrong around the ones that are not circular (a belt's speckled
band, or Terminus and Pyro IV with their rings extending sideways). */
.t-system-map__node[data-current='page'] .t-system-map__name {
color: var(--color-emphasized);
font-weight: var(--font-weight-semi-bold);
}
.t-system-map__node[data-current='page'] .t-system-map__name::after {
content: '';
display: inline-block;
inline-size: 0.36em;
block-size: 0.36em;
margin-left: 0.4em;
vertical-align: 0.18em;
border-radius: var(--border-radius-circle);
background: var(--color-progressive);
}
/* A moved or deleted target. MediaWiki already red-links it; this dims the
disc so the break is visible in the map itself. */
.t-system-map__item--missing .t-system-map__disc {
opacity: 0.45;
}
/* Narrow: the rail becomes a column and the orbit line becomes vertical,
landing on the nested-tree layout. @container is not allowlisted in
MediaWiki 1.43, so this keys off the viewport. */
@media (max-width: 720px) {
.t-system-map__scroll {
overflow-x: visible;
}
.t-system-map__rail {
flex-direction: column;
gap: var(--space-xs);
width: auto;
}
/* Same per-segment logic rotated: from this body's centre down to the next
one's. `bottom` is relative to this item's own box, so it works whatever
height the item has once its moons are stacked under it. */
.t-system-map__rail > .t-system-map__item:not(:last-child)::after {
right: auto;
bottom: calc(0px - var(--space-xs) - var(--t-system-map-centre));
width: 1px;
height: auto;
}
.t-system-map__item--has-moons::before {
display: none;
}
.t-system-map__item--star,
.t-system-map__item--planet,
.t-system-map__item--belt,
.t-system-map__item--rail-moon {
min-width: 0;
}
/* --paired is listed because the pair's own <li> holds no node — its only
child is the __pair list — so the --star selector above reaches nothing and
the two stars inside would keep the column layout while every row beneath
them turned into a row, leaving a head block about twice the height of a
planet. Spelled out rather than matched with :is(), which is not in
TemplateStyles' allowlist and fails the save. */
.t-system-map__item--star > .t-system-map__node,
.t-system-map__item--planet > .t-system-map__node,
.t-system-map__item--belt > .t-system-map__node,
.t-system-map__item--rail-moon > .t-system-map__node,
.t-system-map__item--paired > .t-system-map__node {
flex-direction: row;
align-items: center;
gap: var(--space-xxs);
}
.t-system-map__item--star > .t-system-map__node .t-system-map__label,
.t-system-map__item--planet > .t-system-map__node .t-system-map__label,
.t-system-map__item--belt > .t-system-map__node .t-system-map__label,
.t-system-map__item--rail-moon > .t-system-map__node .t-system-map__label,
.t-system-map__item--paired > .t-system-map__node .t-system-map__label {
flex-direction: row;
flex-wrap: wrap;
align-items: baseline;
gap: var(--space-xs);
}
.t-system-map__moons {
position: relative;
margin-top: var(--space-xxs);
padding-left: var(--t-system-map-track);
}
.t-system-map__moons::before {
content: '';
position: absolute;
left: calc(var(--t-system-map-track) + var(--t-system-map-centre));
top: 0;
bottom: var(--space-xs);
width: 1px;
background: var(--border-color-base);
}
}