Put miles and feet first, and give the site a proper mark
Units. Miles and feet now come first everywhere unless the reader chooses kilometres and metres: paired figures, the time estimate, the elevation profile, page descriptions and the map scale. The length filter and the length scale use round mile steps (round kilometre steps for a reader who chose them). The lists defined by length are now "Under 100 miles" and "The longest" at 1,000 miles or more; the old /lists/under-100-km/ address redirects. The records stay metric. Branding. The tab icon was a bare red blaze that read as a red block; it is now a mountain with a trail up it, with PNG sizes for browsers and phones that need them. The home page opens with the mark, the name and what the site offers. Link previews get a real 1200x630 image: the old one was an SVG, which Reddit, Slack and iMessage do not draw. The decorative contour lines now stay inside the content column and thin out to nothing on every side, where they used to run to the right edge of a wide window and stop dead at the bottom of the band. Tests updated for the new trail counts. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
1 parent
c7e8e58dce
commit
19fabadd49
27 files changed
+480
-189
No files matched your search
+65
-21
@@ -33,7 +33,7 @@
|
||||
var t = root.dataset.theme;
|
||||
return t ? t === 'dark' : darkQuery.matches;
|
||||
}
|
||||
function milesFirst() { return root.dataset.units === 'mi'; }
|
||||
function milesFirst() { return root.dataset.units !== 'km'; }
|
||||
|
||||
function setTheme(value) {
|
||||
if (value === 'light' || value === 'dark') root.dataset.theme = value;
|
||||
@@ -43,10 +43,10 @@
|
||||
}
|
||||
|
||||
function setUnits(value) {
|
||||
if (value === 'mi') root.dataset.units = 'mi';
|
||||
if (value === 'km') root.dataset.units = 'km';
|
||||
else delete root.dataset.units;
|
||||
writePref('lh-units', value === 'mi' ? 'mi' : null);
|
||||
syncRadios('input[name="units"], input[name="units-list"]', value === 'mi' ? 'mi' : 'km');
|
||||
writePref('lh-units', value === 'km' ? 'km' : null);
|
||||
syncRadios('input[name="units"], input[name="units-list"]', value === 'km' ? 'km' : 'mi');
|
||||
document.dispatchEvent(new Event('olt:units'));
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
if (!root.dataset.theme) document.dispatchEvent(new Event('olt:theme'));
|
||||
});
|
||||
|
||||
/* A length in both units, in the reader's order: "1,287 km (800 mi)". */
|
||||
/* A length in both units, in the reader's order: "800 mi (1,287 km)". */
|
||||
function lengthText(km) {
|
||||
var k = fmt.format(km) + ' km';
|
||||
var m = fmt.format(Math.round(km / KM_PER_MI)) + ' mi';
|
||||
@@ -838,16 +838,19 @@
|
||||
}
|
||||
|
||||
function read() {
|
||||
var min = Number(el.min.value) || 0;
|
||||
var max = Number(el.max.value) || Infinity;
|
||||
var min = stepKm(el.min.value) || 0;
|
||||
var max = stepKm(el.max.value) || Infinity;
|
||||
var minRaw = el.min.value, maxRaw = el.max.value;
|
||||
var swapped = min > max;
|
||||
if (swapped) { var keep = min; min = max; max = keep; }
|
||||
if (swapped) { var keep = min; min = max; max = keep; keep = minRaw; minRaw = maxRaw; maxRaw = keep; }
|
||||
var s = {
|
||||
q: el.q.value.trim(),
|
||||
words: el.q.value.trim().toLowerCase().split(/\s+/).filter(Boolean),
|
||||
where: el.where.value,
|
||||
min: min,
|
||||
max: max,
|
||||
minRaw: minRaw,
|
||||
maxRaw: maxRaw,
|
||||
swapped: swapped,
|
||||
month: el.month ? el.month.value : '',
|
||||
kind: radio('kind')
|
||||
@@ -875,27 +878,68 @@
|
||||
return true;
|
||||
}
|
||||
|
||||
function lengthLabel(km) {
|
||||
var k = fmt.format(km) + ' km';
|
||||
var m = fmt.format(Math.round(km / KM_PER_MI)) + ' mi';
|
||||
return milesFirst() ? m + ' · ' + k : k + ' · ' + m;
|
||||
/* A length step's value is "100mi" or "160km": round in its own unit, so the
|
||||
list offered follows the reader's units. Filtering compares kilometres. */
|
||||
function stepKm(value) {
|
||||
var m = /^(\d+(?:\.\d+)?)(mi|km)$/.exec(value || '');
|
||||
return m ? Number(m[1]) * (m[2] === 'mi' ? KM_PER_MI : 1) : 0;
|
||||
}
|
||||
|
||||
function stepLabel(n, unit) {
|
||||
var km = unit === 'mi' ? n * KM_PER_MI : n;
|
||||
var other = unit === 'mi' ? fmt.format(Math.round(km)) + ' km' : fmt.format(Math.round(km / KM_PER_MI)) + ' mi';
|
||||
return fmt.format(n) + ' ' + unit + ' \u00b7 ' + other;
|
||||
}
|
||||
|
||||
/* Offer round steps in the reader's units. The server writes the mile steps;
|
||||
a reader who chose kilometres gets the kilometre steps (data-steps-km), and
|
||||
a chosen step moves to the nearest one in the new list. */
|
||||
function buildLengthOptions() {
|
||||
var unit = milesFirst() ? 'mi' : 'km';
|
||||
form.querySelectorAll('select[data-length-options]').forEach(function (select) {
|
||||
var kind = select.dataset.lengthOptions;
|
||||
var steps = (select.getAttribute('data-steps-' + unit) || '').split(',').filter(Boolean).map(Number);
|
||||
var wasKm = stepKm(select.value);
|
||||
select.textContent = '';
|
||||
function add(value, text, selected) {
|
||||
var o = document.createElement('option');
|
||||
o.value = value;
|
||||
o.textContent = text;
|
||||
if (selected) o.selected = true;
|
||||
select.appendChild(o);
|
||||
}
|
||||
if (kind === 'min') add('', 'Any', false);
|
||||
steps.slice(kind === 'min' ? 0 : 1, kind === 'min' ? -1 : undefined).forEach(function (n) {
|
||||
add(n + unit, stepLabel(n, unit), false);
|
||||
});
|
||||
if (kind === 'max') add('', 'Any', !wasKm);
|
||||
if (wasKm) {
|
||||
var best = null, gap = Infinity;
|
||||
Array.prototype.forEach.call(select.options, function (o) {
|
||||
var k = stepKm(o.value);
|
||||
if (!k) return;
|
||||
var d = Math.abs(Math.log(k / wasKm));
|
||||
if (d < gap) { gap = d; best = o; }
|
||||
});
|
||||
if (best) best.selected = true;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function describeLength(s) {
|
||||
var text;
|
||||
if (!s.min && s.max === Infinity) text = 'Any length.';
|
||||
else if (!s.min) text = 'Up to ' + lengthText(s.max) + '.';
|
||||
else if (s.max === Infinity) text = 'From ' + lengthText(s.min) + ' up.';
|
||||
else text = 'From ' + lengthText(s.min) + ' to ' + lengthText(s.max) + '.';
|
||||
else if (!s.min) text = 'Up to ' + lengthText(Math.round(s.max)) + '.';
|
||||
else if (s.max === Infinity) text = 'From ' + lengthText(Math.round(s.min)) + ' up.';
|
||||
else text = 'From ' + lengthText(Math.round(s.min)) + ' to ' + lengthText(Math.round(s.max)) + '.';
|
||||
if (s.swapped) text += ' Shortest and longest were swapped.';
|
||||
return text;
|
||||
}
|
||||
|
||||
function relabelLengths() {
|
||||
form.querySelectorAll('select[data-length-options] option').forEach(function (o) {
|
||||
if (o.value) o.textContent = lengthLabel(Number(o.value));
|
||||
});
|
||||
buildLengthOptions();
|
||||
setText(lenHint, describeLength(read()));
|
||||
apply(true);
|
||||
}
|
||||
|
||||
/* URL query <-> form. Only values that differ from the defaults are written. */
|
||||
@@ -903,8 +947,8 @@
|
||||
var p = new URLSearchParams();
|
||||
if (s.q) p.set('q', s.q);
|
||||
if (s.where) p.set('where', s.where);
|
||||
if (s.min) p.set('min', String(s.min));
|
||||
if (s.max !== Infinity) p.set('max', String(s.max));
|
||||
if (s.min) p.set('min', s.minRaw);
|
||||
if (s.max !== Infinity) p.set('max', s.maxRaw);
|
||||
if (s.month) p.set('month', s.month);
|
||||
if (s.kind) p.set('kind', s.kind);
|
||||
MULTI.forEach(function (name) { if (s[name].length) p.set(name, s[name].join(',')); });
|
||||
@@ -997,8 +1041,8 @@
|
||||
li.addEventListener('focusout', function () { highlight(''); });
|
||||
});
|
||||
|
||||
buildLengthOptions();
|
||||
fromQuery();
|
||||
relabelLengths();
|
||||
applySort();
|
||||
apply(false);
|
||||
/* The count can announce from here on; the first application is done. */
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 3.6 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 942 B |
@@ -1 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><rect x="5" y="1" width="6" height="14" rx="1" fill="#b3261e"/></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><rect width="32" height="32" rx="7" fill="#b3261e"/><path d="M3.5 25.5 13 7.5l5.2 9.3 2.9-4.6 7.4 13.3z" fill="#f6f2e8"/><path d="M9.6 25.5c3.6-2.6 1-5 3-7.4 1.5-1.8.2-3.6.9-5.6" fill="none" stroke="#b3261e" stroke-width="2" stroke-linecap="round"/></svg>
|
||||
|
Before Width: | Height: | Size: 130 B After Width: | Height: | Size: 316 B |
Binary file not shown.
|
After Width: | Height: | Size: 153 KiB |
+1
-1
@@ -8,6 +8,6 @@
|
||||
var theme = localStorage.getItem('lh-theme');
|
||||
var units = localStorage.getItem('lh-units');
|
||||
if (theme === 'light' || theme === 'dark') root.dataset.theme = theme;
|
||||
if (units === 'mi') root.dataset.units = 'mi';
|
||||
if (units === 'km') root.dataset.units = 'km'; /* anything else, an old 'mi' included, is miles */
|
||||
} catch (e) { /* storage blocked: defaults apply */ }
|
||||
})();
|
||||
+87
-48
@@ -8,7 +8,7 @@
|
||||
Themes: `color-scheme: light dark` follows prefers-color-scheme, and every
|
||||
colour token is written once with light-dark(). /assets/prefs.js pins a
|
||||
theme with <html data-theme="light|dark"> and the length order with
|
||||
<html data-units="mi"> (the footer switches set both).
|
||||
<html data-units="km"> (the footer switches set both); miles and feet come first without it.
|
||||
|
||||
No inline styles except custom properties carrying data (--km, --n, --pos),
|
||||
which the Content-Security-Policy allows through style-src-attr.
|
||||
@@ -230,6 +230,7 @@ code.raw {
|
||||
|
||||
.site-header {
|
||||
background: var(--paper);
|
||||
border-block-start: 4px solid var(--trail);
|
||||
border-block-end: 3px double var(--rule-strong);
|
||||
}
|
||||
.site-header__inner {
|
||||
@@ -246,18 +247,15 @@ code.raw {
|
||||
align-items: center;
|
||||
gap: var(--space-3);
|
||||
color: var(--ink);
|
||||
font: 650 1.3125rem/1 var(--font-serif);
|
||||
letter-spacing: -0.01em;
|
||||
font: 650 1.4375rem/1 var(--font-serif);
|
||||
letter-spacing: -0.015em;
|
||||
text-decoration: none;
|
||||
}
|
||||
.wordmark:hover { text-decoration: none; }
|
||||
/* The mark is a paint blaze, the sign hikers follow on a tree. */
|
||||
.wordmark__blaze {
|
||||
inline-size: 0.6rem;
|
||||
block-size: 1.4rem;
|
||||
background: var(--trail);
|
||||
border-radius: 1px 2px 1px 3px;
|
||||
}
|
||||
/* The mark: a mountain with a trail up it, the same file as the tab icon. */
|
||||
.wordmark__mark { inline-size: 1.75rem; block-size: 1.75rem; }
|
||||
/* The home page carries the name large in its hero, so the header does not repeat it. */
|
||||
body:has(.hero--home) .site-header .wordmark { visibility: hidden; }
|
||||
|
||||
.nav { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-5); padding: 0; list-style: none; }
|
||||
@media (max-width: 30rem) { .nav { column-gap: var(--space-4); } }
|
||||
@@ -323,24 +321,25 @@ code.raw {
|
||||
/* 5. Shared components ------------------------------------------------------- */
|
||||
|
||||
/* Lengths in both units. The reader's preference (html[data-units]) decides
|
||||
which comes first; markup is always <span class="len"><km><mi></span>.
|
||||
.len--inline reads "1,287 km (800 mi)"; .len--stack sets the first unit
|
||||
which comes first: miles and feet unless the reader chose "km"; markup is
|
||||
always <span class="len"><mi><km></span>.
|
||||
.len--inline reads "800 mi (1,287 km)"; .len--stack sets the first unit
|
||||
large over the second. */
|
||||
.len { display: inline-flex; flex-wrap: wrap; align-items: baseline; column-gap: 0.3em; }
|
||||
.len__mi { order: 1; }
|
||||
:root[data-units="mi"] .len__mi { order: -1; }
|
||||
.len--inline .len__mi::before,
|
||||
:root[data-units="mi"] .len--inline .len__km::before { content: "("; }
|
||||
.len--inline .len__mi::after,
|
||||
:root[data-units="mi"] .len--inline .len__km::after { content: ")"; }
|
||||
:root[data-units="mi"] .len--inline .len__mi::before,
|
||||
:root[data-units="mi"] .len--inline .len__mi::after { content: none; }
|
||||
.len__km { order: 1; }
|
||||
:root[data-units="km"] .len__km { order: -1; }
|
||||
.len--inline .len__km::before,
|
||||
:root[data-units="km"] .len--inline .len__mi::before { content: "("; }
|
||||
.len--inline .len__km::after,
|
||||
:root[data-units="km"] .len--inline .len__mi::after { content: ")"; }
|
||||
:root[data-units="km"] .len--inline .len__km::before,
|
||||
:root[data-units="km"] .len--inline .len__km::after { content: none; }
|
||||
.len--stack { display: flex; flex-direction: column; align-items: flex-start; }
|
||||
.len--stack > * { font-variant-numeric: tabular-nums; }
|
||||
:root:not([data-units="mi"]) .len--stack .len__km,
|
||||
:root[data-units="mi"] .len--stack .len__mi { font: 600 var(--len-size, var(--step-1))/1.15 var(--font-sans); color: var(--ink); }
|
||||
:root:not([data-units="mi"]) .len--stack .len__mi,
|
||||
:root[data-units="mi"] .len--stack .len__km { font: 400 var(--step--1)/1.3 var(--font-sans); color: var(--ink-2); }
|
||||
:root:not([data-units="km"]) .len--stack .len__mi,
|
||||
:root[data-units="km"] .len--stack .len__km { font: 600 var(--len-size, var(--step-1))/1.15 var(--font-sans); color: var(--ink); }
|
||||
:root:not([data-units="km"]) .len--stack .len__km,
|
||||
:root[data-units="km"] .len--stack .len__mi { font: 400 var(--step--1)/1.3 var(--font-sans); color: var(--ink-2); }
|
||||
|
||||
/* Kicker: a small caps label above a title */
|
||||
.kicker {
|
||||
@@ -748,15 +747,42 @@ code.raw {
|
||||
.hero::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
inset-block: 0;
|
||||
inset-inline: max(0px, (100% - var(--container)) / 2 - var(--gutter));
|
||||
background: url("contours.svg") 70% 30% / cover no-repeat;
|
||||
-webkit-mask-image: linear-gradient(100deg, transparent 15%, #000 70%);
|
||||
mask-image: linear-gradient(100deg, transparent 15%, #000 70%);
|
||||
/* The lines belong to the content column: on a wide window they stay inside it
|
||||
and do not run on to the right edge of the screen. They spread from the
|
||||
column's top right and thin out to nothing toward the text, the bottom of
|
||||
the band and the column's right edge, so they never stop on a straight line. */
|
||||
-webkit-mask-image: radial-gradient(ellipse 70% 104% at 90% 0%, #000 0%, rgb(0 0 0 / 0.7) 30%, rgb(0 0 0 / 0.28) 58%, transparent 84%), linear-gradient(to right, #000 82%, transparent 100%);
|
||||
mask-image: radial-gradient(ellipse 70% 104% at 90% 0%, #000 0%, rgb(0 0 0 / 0.7) 30%, rgb(0 0 0 / 0.28) 58%, transparent 84%), linear-gradient(to right, #000 82%, transparent 100%);
|
||||
-webkit-mask-composite: source-in;
|
||||
mask-composite: intersect;
|
||||
pointer-events: none;
|
||||
}
|
||||
.hero__inner { position: relative; display: grid; gap: var(--space-5); }
|
||||
.hero h1 { max-inline-size: 28ch; font-size: var(--step-4); font-weight: 600; letter-spacing: -0.015em; }
|
||||
.hero__lede { max-inline-size: 40rem; font-size: var(--step-1); line-height: 1.5; }
|
||||
/* The home page's name plate: mark, name, what the site is, and what it offers. */
|
||||
.hero .lockup {
|
||||
display: flex; align-items: center; gap: clamp(0.75rem, 2.4vw, 1.75rem);
|
||||
max-inline-size: none;
|
||||
font-size: clamp(2.75rem, 1.2rem + 7vw, 6rem); font-weight: 600; line-height: 1; letter-spacing: -0.02em;
|
||||
}
|
||||
.lockup__mark { flex: none; inline-size: 1.15em; block-size: 1.15em; }
|
||||
.hero__tagline { max-inline-size: 26em; font: 400 var(--step-3)/1.25 var(--font-serif); }
|
||||
.hero__tags {
|
||||
display: flex; flex-wrap: wrap; gap: var(--space-1) 0; padding: 0; list-style: none;
|
||||
color: var(--ink-2); font: 600 var(--step-0)/1.4 var(--font-sans); letter-spacing: 0.09em; text-transform: uppercase;
|
||||
}
|
||||
/* Each item carries its dot on the left; the list is shifted and clipped by the
|
||||
same amount so a dot never starts a line. */
|
||||
.hero__tags { margin-inline-start: -1.7em; clip-path: inset(0 0 0 1.7em); }
|
||||
.hero__tags li { position: relative; padding-inline-start: 1.7em; }
|
||||
.hero__tags li::before { content: "\00B7"; position: absolute; inset-inline-start: 0.65em; }
|
||||
.hero__tags a { color: inherit; text-decoration: none; }
|
||||
.hero__tags a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 0.2em; }
|
||||
.hero--home .hero__lede { color: var(--ink-2); font-size: var(--step-0); }
|
||||
.hero__caveat {
|
||||
max-inline-size: 40rem;
|
||||
padding-inline-start: var(--space-4);
|
||||
@@ -993,7 +1019,7 @@ html:not(.js) .list-head__arrow { display: none; }
|
||||
.entry__facts dd { margin: var(--space-1) 0 0; }
|
||||
|
||||
/* Length strip on a log scale: 50 km at the left edge, 30,000 km at the right.
|
||||
Ticks mark 100, 1,000 and 10,000 km. Uses CSS log(); without it the strip
|
||||
Ticks mark 100, 1,000 and 10,000 miles, or kilometres when the reader chose them. Uses CSS log(); without it the strip
|
||||
shows ticks only. */
|
||||
.loglen {
|
||||
--tick: var(--rule-strong);
|
||||
@@ -1005,6 +1031,12 @@ html:not(.js) .list-head__arrow { display: none; }
|
||||
}
|
||||
@supports (inline-size: calc(log(2) * 1%)) {
|
||||
.loglen {
|
||||
background:
|
||||
linear-gradient(var(--tick) 0 0) calc(log(100 * 1.609344 / 50) / log(600) * 100%) 100% / 1px 100% no-repeat,
|
||||
linear-gradient(var(--tick) 0 0) calc(log(1000 * 1.609344 / 50) / log(600) * 100%) 100% / 1px 100% no-repeat,
|
||||
linear-gradient(var(--tick) 0 0) calc(log(10000 * 1.609344 / 50) / log(600) * 100%) 100% / 1px 100% no-repeat;
|
||||
}
|
||||
:root[data-units="km"] .loglen {
|
||||
background:
|
||||
linear-gradient(var(--tick) 0 0) calc(log(2) / log(600) * 100%) 100% / 1px 100% no-repeat,
|
||||
linear-gradient(var(--tick) 0 0) calc(log(20) / log(600) * 100%) 100% / 1px 100% no-repeat,
|
||||
@@ -1101,13 +1133,17 @@ html:not(.js) .list-head__arrow { display: none; }
|
||||
.list-head__sort.is-active .list-head__arrow { color: var(--trail); }
|
||||
.list-head__scale { position: relative; display: block; block-size: 1em; margin-block-start: var(--space-1); font: 400 0.6875rem/1 var(--font-mono); letter-spacing: 0; text-transform: none; }
|
||||
.list-head__scale > span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
|
||||
.list-head__scale > span:nth-child(1) { inset-inline-start: 10.8%; }
|
||||
.list-head__scale > span:nth-child(2) { inset-inline-start: 46.8%; }
|
||||
.list-head__scale > span:nth-child(3) { inset-inline-start: 82.8%; }
|
||||
/* Ticks at 100, 1,000 and 10,000 miles (the strip itself is on a kilometre scale). */
|
||||
.list-head__scale > span:nth-child(1) { inset-inline-start: 18.3%; }
|
||||
.list-head__scale > span:nth-child(2) { inset-inline-start: 54.3%; }
|
||||
.list-head__scale > span:nth-child(3) { inset-inline-start: 90.3%; }
|
||||
:root[data-units="km"] .list-head__scale > span:nth-child(1) { inset-inline-start: 10.8%; }
|
||||
:root[data-units="km"] .list-head__scale > span:nth-child(2) { inset-inline-start: 46.8%; }
|
||||
:root[data-units="km"] .list-head__scale > span:nth-child(3) { inset-inline-start: 82.8%; }
|
||||
/* One tick figure per mark, in the reader's units; the last carries the unit. */
|
||||
.list-head__scale .len__mi { display: none; }
|
||||
:root[data-units="mi"] .list-head__scale .len__mi { display: inline; }
|
||||
:root[data-units="mi"] .list-head__scale .len__km { display: none; }
|
||||
.list-head__scale .len__km { display: none; }
|
||||
:root[data-units="km"] .list-head__scale .len__km { display: inline; }
|
||||
:root[data-units="km"] .list-head__scale .len__mi { display: none; }
|
||||
}
|
||||
|
||||
.empty-state {
|
||||
@@ -1129,10 +1165,13 @@ html:not(.js) .list-head__arrow { display: none; }
|
||||
.page-head::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
inset-block: 0;
|
||||
inset-inline: max(0px, (100% - var(--container)) / 2 - var(--gutter));
|
||||
background: url("contours.svg") 85% 40% / cover no-repeat;
|
||||
-webkit-mask-image: linear-gradient(100deg, transparent 35%, #000 85%);
|
||||
mask-image: linear-gradient(100deg, transparent 35%, #000 85%);
|
||||
-webkit-mask-image: radial-gradient(ellipse 60% 104% at 90% 0%, #000 0%, rgb(0 0 0 / 0.7) 30%, rgb(0 0 0 / 0.28) 58%, transparent 84%), linear-gradient(to right, #000 82%, transparent 100%);
|
||||
mask-image: radial-gradient(ellipse 60% 104% at 90% 0%, #000 0%, rgb(0 0 0 / 0.7) 30%, rgb(0 0 0 / 0.28) 58%, transparent 84%), linear-gradient(to right, #000 82%, transparent 100%);
|
||||
-webkit-mask-composite: source-in;
|
||||
mask-composite: intersect;
|
||||
opacity: 0.8;
|
||||
pointer-events: none;
|
||||
}
|
||||
@@ -1613,9 +1652,9 @@ td .linklist a { font-weight: 400; }
|
||||
.elev-profile__line { fill: none; stroke: var(--trail); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
|
||||
.elev-profile__mark { fill: var(--surface); stroke: var(--trail); stroke-width: 2; }
|
||||
/* One axis system at a time, by the reader's unit preference */
|
||||
.elev-profile .len__mi { display: none; }
|
||||
:root[data-units="mi"] .elev-profile .len__mi { display: inline; }
|
||||
:root[data-units="mi"] .elev-profile .len__km { display: none; }
|
||||
.elev-profile .len__km { display: none; }
|
||||
:root[data-units="km"] .elev-profile .len__km { display: inline; }
|
||||
:root[data-units="km"] .elev-profile .len__mi { display: none; }
|
||||
|
||||
/* Below the hiker's part: the plain foot line, then "About this data" */
|
||||
.trail-more { padding-block: var(--space-6) var(--space-7); }
|
||||
@@ -1682,9 +1721,9 @@ td .linklist a { font-weight: 400; }
|
||||
.shelf__len { flex: none; color: var(--ink-2); font-variant-numeric: tabular-nums; }
|
||||
.shelf__more { font: 600 var(--step--1)/1.3 var(--font-sans); }
|
||||
/* One unit only in a card row, the reader's */
|
||||
.len--short .len__mi { display: none; }
|
||||
:root[data-units="mi"] .len--short .len__mi { display: inline; }
|
||||
:root[data-units="mi"] .len--short .len__km { display: none; }
|
||||
.len--short .len__km { display: none; }
|
||||
:root[data-units="km"] .len--short .len__km { display: inline; }
|
||||
:root[data-units="km"] .len--short .len__mi { display: none; }
|
||||
|
||||
.region-chips { margin-block-start: var(--space-6); }
|
||||
.region-chips h3 { margin-block-end: var(--space-3); font-size: var(--step-1); }
|
||||
@@ -1798,7 +1837,7 @@ a.tag:hover { background: var(--sunken); }
|
||||
|
||||
/* The trail list where there is no room for columns (a phone, or beside the
|
||||
filters on a laptop): a compact card, not a table folded in on itself. Name, one or two lines of description, the place, then the facts on
|
||||
one wrapping line ("420 km · About 4 weeks · Partial GPX here"). The labels,
|
||||
one wrapping line ("260 mi · About 4 weeks · Partial GPX here"). The labels,
|
||||
the length strip, the second unit and the boxed notes are for wide rows; the
|
||||
trail's own page has all of it. */
|
||||
@container results (max-width: 65.99rem) {
|
||||
@@ -1830,10 +1869,10 @@ a.tag:hover { background: var(--sunken); }
|
||||
.entry__facts dt { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
|
||||
.entry__facts dd { margin: 0; font: inherit; }
|
||||
.entry__facts .len--stack { display: inline; }
|
||||
:root:not([data-units="mi"]) .entry__facts .len--stack .len__km,
|
||||
:root[data-units="mi"] .entry__facts .len--stack .len__mi { font: 600 var(--step--1)/1.5 var(--font-sans); }
|
||||
:root:not([data-units="mi"]) .entry__facts .len--stack .len__mi,
|
||||
:root[data-units="mi"] .entry__facts .len--stack .len__km { display: none; }
|
||||
:root:not([data-units="km"]) .entry__facts .len--stack .len__mi,
|
||||
:root[data-units="km"] .entry__facts .len--stack .len__km { font: 600 var(--step--1)/1.5 var(--font-sans); }
|
||||
:root:not([data-units="km"]) .entry__facts .len--stack .len__km,
|
||||
:root[data-units="km"] .entry__facts .len--stack .len__mi { display: none; }
|
||||
.entry__facts .loglen,
|
||||
.entry__facts .swatch,
|
||||
.entry__facts .line__detail,
|
||||
|
||||
Reference in new issue
Block a user