@waveso/docs 0.9.0 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +67 -0
- package/dist/styles.css +109 -10
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,72 @@
|
|
|
1
1
|
# @waveso/docs
|
|
2
2
|
|
|
3
|
+
## 0.9.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 80d3db4: The sidebar's handle and the search shortcut stop competing with the page.
|
|
8
|
+
|
|
9
|
+
**The handle is 16 × 56 and faded.** It was 20 × 80 at full strength — a solid
|
|
10
|
+
slab beside the reading column, for a control nobody looks at while reading. It
|
|
11
|
+
now sits at 40% until a pointer or a caret reaches it, the same treatment as the
|
|
12
|
+
tree's markers.
|
|
13
|
+
|
|
14
|
+
⚠️ BOTH MARKS FADE, NOT THE PILL ALONE. Fading `::before` by itself leaves crisp
|
|
15
|
+
dots on a washed-out slab, which reads louder than the solid grip it replaced.
|
|
16
|
+
|
|
17
|
+
⚠️ AND NOT ON THE `<button>`, which would take the focus ring down with it —
|
|
18
|
+
`opacity` applies to the whole element, outline included, so a keyboard reader
|
|
19
|
+
would get a 40% indicator on the control they had just moved to. It is on the
|
|
20
|
+
two pseudo-elements, and `:focus-visible` restores both.
|
|
21
|
+
|
|
22
|
+
⚠️ THE TAP TARGET IS UNCHANGED BY ANY OF IT. The button is the whole strip and
|
|
23
|
+
runs the height of the column; the pill is paint. At 16px plus 4px of padding a
|
|
24
|
+
side the strip is 24px wide — WCAG 2.5.8's minimum to the pixel, and a test now
|
|
25
|
+
says so, because the next narrowing is the one that fails it.
|
|
26
|
+
|
|
27
|
+
⚠️ THE DOTS DO NOT SCALE WITH THE PILL. They are `box-shadow` offsets on one
|
|
28
|
+
element, so they span 18px whatever the pill does. Found by shortening it to
|
|
29
|
+
16px tall and watching the outer two render outside it.
|
|
30
|
+
|
|
31
|
+
**`⌘K` is levelled with `Search`.** Equal `font-size` in two families is not
|
|
32
|
+
equal type: the label is `ui-sans-serif` and the badge `ui-monospace`, which
|
|
33
|
+
draws 0.7292px of cap per px. `1.012em` is what puts the `K`'s cap on the `S`'s.
|
|
34
|
+
|
|
35
|
+
⚠️ AND THE SYMBOL IS `1.369em`, THE MEASURED INK RATIO — NOT A HAIR MORE. At
|
|
36
|
+
`1.45em` the `⌘` stood 6% above the cap line, and the badge read as _bigger
|
|
37
|
+
type_ than the label: 88 device px of ink against the word's 85, its top three
|
|
38
|
+
higher, its centre 1.5 out. Same letter height, louder cluster. At the ratio,
|
|
39
|
+
`Search` and `⌘K` measure 85 and 85 and share a centre to the device pixel.
|
|
40
|
+
|
|
41
|
+
⚠️ AND `line-height: 0` ON THE SYMBOL, WHICH IS WHAT MADE THE TWO CENTRE. A line
|
|
42
|
+
box is as tall as the tallest inline box in it, so the 20.5px glyph made the
|
|
43
|
+
`<kbd>` 20.55px against the label's 17 — and flex centres them by their _boxes_,
|
|
44
|
+
so the `K` rode 1.9px high inside a box the symbol had stretched.
|
|
45
|
+
|
|
46
|
+
Also fixed: the focus-indicator test looked its selectors up with `indexOf`, so
|
|
47
|
+
`…:focus-visible` matched inside `…:focus-visible::before` — a different rule,
|
|
48
|
+
about pseudo-elements, with no business declaring an outline. It reported the
|
|
49
|
+
trigger as having no focus indicator while the trigger's own rule sat further
|
|
50
|
+
down the file declaring one.
|
|
51
|
+
|
|
52
|
+
- 27f63ec: Sidebar separators keep the case their author wrote them in.
|
|
53
|
+
|
|
54
|
+
⚠️ `text-transform: uppercase` ON A STRING THIS PACKAGE DOES NOT OWN. A
|
|
55
|
+
separator's text comes from a consumer's `meta.json` — `"---Reference---"` —
|
|
56
|
+
and restyling it is this package rewriting words in a language it cannot read.
|
|
57
|
+
Portuguese `Referência` shipped as `REFERÊNCIA`. Turkish trades its dotted and
|
|
58
|
+
dotless `i` for each other under a naive uppercase. No CJK script has a case to
|
|
59
|
+
transform at all, so those authors got the `letter-spacing` and none of the
|
|
60
|
+
effect it existed to rescue.
|
|
61
|
+
|
|
62
|
+
The string was already a prop. Its shape was not, and there was no way to turn
|
|
63
|
+
this off short of overriding the rule.
|
|
64
|
+
|
|
65
|
+
Reading as a divider rather than as another row is done by size, weight and a
|
|
66
|
+
subtle colour — none of which touch a character. `letter-spacing` goes with the
|
|
67
|
+
caps: it is there to make uppercase legible, and on sentence case it only reads
|
|
68
|
+
as loose.
|
|
69
|
+
|
|
3
70
|
## 0.9.0
|
|
4
71
|
|
|
5
72
|
### Minor Changes
|
package/dist/styles.css
CHANGED
|
@@ -153,7 +153,7 @@
|
|
|
153
153
|
* of padding on every side — so setting this is the whole of resizing the
|
|
154
154
|
* control, and the hit area grows with it rather than being a second number
|
|
155
155
|
* to keep in step. */
|
|
156
|
-
--wave-docs-trigger-width:
|
|
156
|
+
--wave-docs-trigger-width: 1rem;
|
|
157
157
|
--wave-docs-toc-width: 15rem;
|
|
158
158
|
|
|
159
159
|
/*
|
|
@@ -1768,14 +1768,28 @@
|
|
|
1768
1768
|
margin-block: 1rem 0.25rem;
|
|
1769
1769
|
}
|
|
1770
1770
|
|
|
1771
|
+
/*
|
|
1772
|
+
* ⚠️ NO `text-transform: uppercase`, AND IT USED TO HAVE ONE.
|
|
1773
|
+
*
|
|
1774
|
+
* A separator's text is authored — `"---Reference---"` in someone's
|
|
1775
|
+
* `meta.json` — so uppercasing it is this package rewriting words it does not
|
|
1776
|
+
* own, in a language it cannot read. Portuguese `Referência` came out as
|
|
1777
|
+
* `REFERÊNCIA`; Turkish loses the dotted and dotless `i` to each other, and
|
|
1778
|
+
* no CJK script has a case to transform at all, so those authors got the
|
|
1779
|
+
* `letter-spacing` and none of the effect it was there to rescue. And it
|
|
1780
|
+
* could not be turned off — the string is a prop, but its shape was ours.
|
|
1781
|
+
*
|
|
1782
|
+
* The job the caps were doing — read as a divider, not as a row — is already
|
|
1783
|
+
* done by the size, the weight and the subtle colour, none of which touch a
|
|
1784
|
+
* single character. `letter-spacing` went with them: it exists to make caps
|
|
1785
|
+
* legible, and on sentence case it only reads as loose.
|
|
1786
|
+
*/
|
|
1771
1787
|
.wave-docs-sidebar__separator {
|
|
1772
1788
|
display: block;
|
|
1773
1789
|
padding-inline: 0.5rem;
|
|
1774
1790
|
color: var(--wave-docs-fg-subtle);
|
|
1775
1791
|
font-size: 0.75rem;
|
|
1776
1792
|
font-weight: 650;
|
|
1777
|
-
letter-spacing: 0.06em;
|
|
1778
|
-
text-transform: uppercase;
|
|
1779
1793
|
}
|
|
1780
1794
|
|
|
1781
1795
|
@media (prefers-reduced-motion: no-preference) {
|
|
@@ -2607,7 +2621,12 @@
|
|
|
2607
2621
|
.wave-docs-layout__sidebar-trigger::before {
|
|
2608
2622
|
content: '';
|
|
2609
2623
|
width: var(--wave-docs-trigger-width);
|
|
2610
|
-
|
|
2624
|
+
/*
|
|
2625
|
+
* 16 x 56 — a 3.5:1 grip. It was 20 x 80, which at the old width read as a
|
|
2626
|
+
* slab; narrowing it made the length obvious. The floor is 18px, the span
|
|
2627
|
+
* of the three dots, and nothing here scales with the pill: see `::after`.
|
|
2628
|
+
*/
|
|
2629
|
+
height: 3.5rem;
|
|
2611
2630
|
border-radius: var(--wave-docs-radius-sm);
|
|
2612
2631
|
background-color: var(--wave-docs-border-strong);
|
|
2613
2632
|
}
|
|
@@ -2631,11 +2650,46 @@
|
|
|
2631
2650
|
translate: -50% -50%;
|
|
2632
2651
|
border-radius: 50%;
|
|
2633
2652
|
background: currentcolor;
|
|
2653
|
+
/*
|
|
2654
|
+
* ⚠️ THE DOTS DO NOT SCALE WITH THE PILL. They are `box-shadow` offsets on
|
|
2655
|
+
* one element, so ±7px is 18px of ink whatever `--wave-docs-trigger-width`
|
|
2656
|
+
* or the pill's height happen to be. Shorten the pill below 18px and the
|
|
2657
|
+
* outer two sit outside it, top and bottom — measured, not guessed.
|
|
2658
|
+
*/
|
|
2634
2659
|
box-shadow:
|
|
2635
2660
|
0 -7px 0 currentcolor,
|
|
2636
2661
|
0 7px 0 currentcolor;
|
|
2637
2662
|
}
|
|
2638
2663
|
|
|
2664
|
+
/*
|
|
2665
|
+
* Faded at rest, full strength under a pointer or a caret — the same
|
|
2666
|
+
* treatment as the tree's markers, and for the same reason: this is a handle,
|
|
2667
|
+
* not a thing to look at while reading.
|
|
2668
|
+
*
|
|
2669
|
+
* ⚠️ BOTH MARKS, NOT THE PILL ALONE. Fading `::before` by itself leaves the
|
|
2670
|
+
* dots at full strength on a washed-out slab, which reads louder than the
|
|
2671
|
+
* solid grip it replaced — the opposite of the point.
|
|
2672
|
+
*
|
|
2673
|
+
* ⚠️ AND NOT ON THE BUTTON ITSELF, which would take the focus ring down with
|
|
2674
|
+
* it: `opacity` applies to the whole element, outline included, so a keyboard
|
|
2675
|
+
* reader would get a 40% indicator on a control they had just moved to.
|
|
2676
|
+
*
|
|
2677
|
+
* ⚠️ THE TAP TARGET IS UNTOUCHED BY ANY OF THIS. The `<button>` is the entire
|
|
2678
|
+
* strip and runs the height of the column; the pill is paint. Its 80px was
|
|
2679
|
+
* only ever ink, which is why 32px costs nothing a finger can feel.
|
|
2680
|
+
*/
|
|
2681
|
+
.wave-docs-layout__sidebar-trigger::before,
|
|
2682
|
+
.wave-docs-layout__sidebar-trigger::after {
|
|
2683
|
+
opacity: 0.4;
|
|
2684
|
+
}
|
|
2685
|
+
|
|
2686
|
+
.wave-docs-layout__sidebar-trigger:hover::before,
|
|
2687
|
+
.wave-docs-layout__sidebar-trigger:hover::after,
|
|
2688
|
+
.wave-docs-layout__sidebar-trigger:focus-visible::before,
|
|
2689
|
+
.wave-docs-layout__sidebar-trigger:focus-visible::after {
|
|
2690
|
+
opacity: 1;
|
|
2691
|
+
}
|
|
2692
|
+
|
|
2639
2693
|
/*
|
|
2640
2694
|
* ⚠️ THE STRIP'S HOVER LIGHTS THE BUTTON TOO, AND THAT IS WHAT MAKES IT ONE
|
|
2641
2695
|
* CONTROL. Hovering 44px of strip while the button inside it stays grey reads
|
|
@@ -2667,7 +2721,8 @@
|
|
|
2667
2721
|
*/
|
|
2668
2722
|
transition:
|
|
2669
2723
|
background-color 120ms ease-out,
|
|
2670
|
-
color 120ms ease-out
|
|
2724
|
+
color 120ms ease-out,
|
|
2725
|
+
opacity 120ms ease-out;
|
|
2671
2726
|
}
|
|
2672
2727
|
}
|
|
2673
2728
|
|
|
@@ -2945,20 +3000,64 @@
|
|
|
2945
3000
|
border-radius: var(--wave-docs-radius-sm);
|
|
2946
3001
|
}
|
|
2947
3002
|
|
|
3003
|
+
/*
|
|
3004
|
+
* ⚠️ THE LABEL'S SIZE, AND IT IS THE CAPS THAT HAD TO MATCH — NOT THE NUMBER.
|
|
3005
|
+
*
|
|
3006
|
+
* `Search` is `ui-sans-serif` and this is `ui-monospace`, and the same
|
|
3007
|
+
* `font-size` in two families does not give you the same letter. Measured at
|
|
3008
|
+
* 14px: the label's `S` carries 10.33px of ink and the mono `K` carries
|
|
3009
|
+
* 10.21px. A tenth of a pixel — invisible until you look, and then it is the
|
|
3010
|
+
* only thing you can see.
|
|
3011
|
+
*
|
|
3012
|
+
* `1.012em` is that tenth. Mono here draws 0.7292px of cap per px of
|
|
3013
|
+
* `font-size`, so 10.33px of cap needs 14.17px, which is 1.012 x the 14px it
|
|
3014
|
+
* sits beside. `em` rather than a `rem` constant so it tracks the label if
|
|
3015
|
+
* the trigger's size ever moves.
|
|
3016
|
+
*
|
|
3017
|
+
* ⚠️ IT IS A MEASURED CONSTANT AND IT BELONGS TO THESE TWO FAMILIES. Change
|
|
3018
|
+
* `--wave-docs-font-mono` or `--wave-docs-font-sans` and it is wrong — not
|
|
3019
|
+
* broken, just quietly a tenth of a pixel out again. Re-measure the caps, do
|
|
3020
|
+
* not re-derive from the declaration.
|
|
3021
|
+
*
|
|
3022
|
+
* Not in the shared rule above: the footer's caps sit in a 12px footer and
|
|
3023
|
+
* belong at 12px. This is the only `<kbd>` standing beside body-sized text.
|
|
3024
|
+
*/
|
|
3025
|
+
.wave-docs-search-trigger-kbd {
|
|
3026
|
+
font-size: 1.012em;
|
|
3027
|
+
}
|
|
3028
|
+
|
|
2948
3029
|
/*
|
|
2949
3030
|
* ⚠️ THE SYMBOL IS SCALED AND THE WORD IS NOT — which is why this is a
|
|
2950
3031
|
* separate element rather than one string in the `<kbd>`.
|
|
2951
3032
|
*
|
|
2952
|
-
* Measured in the shipped mono stack
|
|
2953
|
-
* `K
|
|
2954
|
-
*
|
|
3033
|
+
* Measured in the shipped mono stack: `⌘` carries 6.39px of ink per 8.75px of
|
|
3034
|
+
* `K`, so at a shared `font-size` it sits a third short of the letter next to
|
|
3035
|
+
* it. `1.369em` is exactly that ratio, and it makes the two the same height.
|
|
3036
|
+
*
|
|
3037
|
+
* ⚠️ NOT A HAIR TALLER, WHICH IS WHERE THIS FIRST LANDED. `1.45em` gave the
|
|
3038
|
+
* symbol 6% on the `K` — invisible at 12px, and at this size 0.6px of ink
|
|
3039
|
+
* standing above the cap line. It made the whole badge read as *bigger type*
|
|
3040
|
+
* than the label beside it: measured against the word `Search`, 88 device px
|
|
3041
|
+
* of ink against 85, its top three device px higher and its centre 1.5 out.
|
|
3042
|
+
* Same letter height, louder cluster. The eye compares the clusters.
|
|
2955
3043
|
*
|
|
2956
3044
|
* `Ctrl` gets none of it: it is a word set in the same face as the `K`, and
|
|
2957
3045
|
* scaling it would make the hint shout.
|
|
2958
3046
|
*/
|
|
2959
3047
|
.wave-docs-search-trigger-mod[data-symbol] {
|
|
2960
|
-
font-size: 1.
|
|
2961
|
-
|
|
3048
|
+
font-size: 1.369em;
|
|
3049
|
+
/*
|
|
3050
|
+
* ⚠️ `0`, NOT `1` — THIS GLYPH MUST NOT SIZE THE LINE IT SITS ON. A line
|
|
3051
|
+
* box is as tall as the tallest inline box in it, so at `line-height: 1`
|
|
3052
|
+
* this 20.5px symbol made the `<kbd>` 20.55px tall against the label's 17,
|
|
3053
|
+
* and the two were centred as flex items by their *boxes*. Same cap height,
|
|
3054
|
+
* 1.9px apart on screen — measured off an 8x render, invisible in the CSS.
|
|
3055
|
+
*
|
|
3056
|
+
* At `0` the symbol contributes no height, the `<kbd>` keeps the line box
|
|
3057
|
+
* its own font gives it, and the `K` centres with the `S` beside it. The
|
|
3058
|
+
* glyph still paints in full: `line-height` bounds the line, not the ink.
|
|
3059
|
+
*/
|
|
3060
|
+
line-height: 0;
|
|
2962
3061
|
/*
|
|
2963
3062
|
* ⚠️ AND IT HAS TO BE MOVED DOWN, WHICH `font-size` ALONE WILL NEVER DO.
|
|
2964
3063
|
*
|
package/package.json
CHANGED