16dca64834
gates / gates (push) Successful in 6m31s
Each category is a native <details>, closed at first, with an 'n selected' count; a preset opens what it ticks. A sticky memory bar (0-64 GB, marks 8/16/24/32/48/64+): solid fill = smallest box memory where the selection fits well, thin mark = where it fits, but tight; one line names the box to buy. minBoxGb() inverts guestMib() by bisection on it, so the rule is still written once. Box sizes 12/24/48/64 added; tests cover seven sizes and the inverse (red-proofed); SIZING.md table gains 24 GB.
58 lines
4.4 KiB
CSS
58 lines
4.4 KiB
CSS
/* sizing.css — the machine estimator only (/gepigeny, /en/sizing). Every selector starts with .sizer,
|
|
so nothing here reaches the shell or another page. Tokens from site.css :root; no raw colours.
|
|
v2 (2026-10-13): fold-out categories in the FAQ's look, and the memory bar (sticky on a phone). */
|
|
.sizer[hidden] { display: none; }
|
|
.sizer-presets { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1rem; }
|
|
|
|
/* the memory bar — kept short: track, marks, one line, a legend (≈ 130 px, under a quarter of 390 x 800) */
|
|
.sizer-sticky { position: sticky; top: 0; z-index: 5; background: var(--bg-0); border-bottom: 1px solid var(--line); padding: 0.75rem 0 0.6rem; margin: 0 0 1rem; }
|
|
.sizer-meter { padding: 0 0 1.4rem; }
|
|
.sizer-track { position: relative; height: 12px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); }
|
|
.sizer-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--blue); border-radius: var(--radius); transition: width 0.25s ease; }
|
|
.sizer-tightmark { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; background: var(--warn); transition: left 0.25s ease; }
|
|
.sizer-scale { position: relative; height: 1rem; margin-top: 0.3rem; }
|
|
.sizer-mark { position: absolute; transform: translateX(-100%); padding-right: 2px; border-right: 1px solid var(--line); font-family: var(--font-data); font-size: 0.72rem; color: var(--text-3); white-space: nowrap; line-height: 1rem; }
|
|
.sizer-line { margin: 0; color: var(--text-1); font-weight: 600; line-height: 1.45; }
|
|
.sizer-legend { margin: 0.2rem 0 0; color: var(--text-3); font-size: 0.78rem; }
|
|
|
|
.sizer-result { margin: 0 0 1.25rem; }
|
|
.sizer-totals { color: var(--text-2); margin: 0; line-height: 1.7; }
|
|
.sizer-num { font-family: var(--font-data); color: var(--text-1); font-weight: 600; }
|
|
.sizer-fine { color: var(--text-3); font-size: 0.85rem; margin: 0.25rem 0 0; }
|
|
.sizer-why { color: var(--text-2); font-size: 0.9rem; margin: 0.4rem 0 0; }
|
|
.sizer-sub { font-size: 1rem; margin: 1.25rem 0 0.5rem; }
|
|
.sizer-cpu { margin: 0; padding-left: 1.1rem; color: var(--text-2); line-height: 1.6; }
|
|
.sizer-cpu strong { color: var(--text-1); font-weight: 600; }
|
|
|
|
/* fold-out categories: native <details>, dressed like the FAQ's items (gyik.html) */
|
|
.sizer-cat { background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; overflow: hidden; transition: border-color 0.3s ease; }
|
|
.sizer-cat:hover { border-color: var(--blue); }
|
|
.sizer-cat-head { list-style: none; display: flex; align-items: center; gap: 0.75rem; padding: 16px 20px; cursor: pointer; color: var(--text-1); font-weight: 600; transition: background 0.2s ease; }
|
|
.sizer-cat-head::-webkit-details-marker { display: none; }
|
|
.sizer-cat-head:hover { background: var(--blue-dim); }
|
|
.sizer-cat-head:focus-visible { outline: 2px solid var(--blue-bright); outline-offset: -2px; }
|
|
.sizer-cat-name { flex: 1 1 auto; min-width: 0; }
|
|
.sizer-cat-count { flex: 0 0 auto; font-family: var(--font-data); font-size: 0.8rem; font-weight: 500; color: var(--blue-bright); }
|
|
.sizer-chevron { flex: 0 0 auto; color: var(--blue-bright); transition: transform 0.3s ease; }
|
|
.sizer-cat[open] .sizer-chevron { transform: rotate(180deg); }
|
|
.sizer-cat-body { padding: 0 20px 14px; }
|
|
.sizer-app { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.15rem 0.6rem; padding: 0.35rem 0; cursor: pointer; }
|
|
.sizer-app input { accent-color: var(--blue); width: 1.05rem; height: 1.05rem; margin: 0; flex: 0 0 auto; align-self: center; }
|
|
.sizer-app input:focus-visible { outline: 2px solid var(--blue-bright); outline-offset: 2px; }
|
|
.sizer-app input:disabled + .sizer-app-name { color: var(--text-2); }
|
|
.sizer-app-name { color: var(--text-1); }
|
|
.sizer-app-tag { color: var(--text-3); font-size: 0.85rem; }
|
|
|
|
.sizer-advice { margin: 0; padding-left: 1.1rem; color: var(--text-2); line-height: 1.7; }
|
|
.sizer-how { margin-top: 1.5rem; color: var(--text-2); }
|
|
.sizer-how summary { cursor: pointer; color: var(--text-1); }
|
|
.sizer-how summary:focus-visible { outline: 2px solid var(--blue-bright); outline-offset: 2px; }
|
|
.sizer-how p { margin: 0.5rem 0 0; line-height: 1.65; }
|
|
.sizer-noscript { color: var(--warn); }
|
|
|
|
/* a phone: the shell's top bar is sticky at the top (≈ 53 px, shell.css), so the memory bar sits under it */
|
|
@media (max-width: 768px) {
|
|
.sizer-sticky { top: 53px; }
|
|
.sizer-mark { font-size: 0.66rem; }
|
|
}
|