Repository navigation
network diagram: use type tokens for step buttons and the note - #22
Merged
Merged
Conversation
Point .step at --km-text-sm and .note at --km-text-xs. Those tokens are 0.875rem and 0.75rem, the same sizes the literals were. Co-authored-by: Rodrigo <rodrigo.ccordoba@hotmail.com>
Owner
Author
|
approved at a57cba6.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.stepnow usesvar(--km-text-sm)and.noteusesvar(--km-text-xs). Copy is unchanged, including1.77x,22% to 65%, andabout 99%.Computed size
Measured in Chrome on the static homepage. Root font size was 16px.
--km-text-smis0.875remand--km-text-xsis0.75reminglobal.css. The custom properties computed to.875remand.75rem..step0.875remvar(--km-text-sm).note0.75remvar(--km-text-xs)The note stays
display: noneuntil reduced motion. Withprefers-reduced-motion: reduceit isdisplay: blockand still 12px, before and after. Measured.Judged: the tokens are the same rem values as the literals, so the computed size does not change.
Section height
Measured.
#networkafter pausing on step 5. The before and after PNGs are byte-identical at both widths, and the reduced-motion frames are byte-identical too.The diagram card was 382px at 1440 and 766px at 390 on both builds. With reduced motion at 1440 the section was 1572px on both, because the note is shown. Measured.
axe-core 4.14.1
Measured on the after homepage, paused on step 5. Tags
wcag2a,wcag2aa,wcag21a,wcag21aa,wcag22aa.color-contrast, 15 nodes)color-contrast, 14 nodes)Lighthouse
Measured. One Lighthouse process at a time, interleaved before then after. Local static builds, not the live site. Before is
88b8de6on port 4180. After is this branch on port 4181.Setup: mobile form factor, screen 412×823 at device scale 1.75, simulated throttling (RTT 150 ms, throughput 1638.4 kbps, request latency 562.5 ms, download 1474.56 kbps, upload 675 kbps, CPU slowdown 4×). Lighthouse 13.6.0. Chrome 157.0.8103.50 (
HeadlessChrome/157.0.0.0in the result). Flags:--only-categories=performance --form-factor=mobile --chrome-flags="--headless=new --no-sandbox --disable-gpu --disable-dev-shm-usage".Times are milliseconds. The after performance median does not drop. The one before score of 99 is the run with benchmarkIndex 3077.5 and TBT 108.5 ms. Measured.
Check
Measured.
npm testpassed, 45 tests.npm run buildpassed.npm run lintpassed.Screenshots
On
pr-assetsate37abf5.1440 before
1440 after
390 before
390 after
Loop, steps 1, 3, and 5
Reduced motion