Code
Code highlights short strings of code snippets inline with body text.
When to use
- A value that must be typed or copied exactly, such as a token name, a flag or a path.
- Inline, for a single identifier inside a sentence.
- As a block, for something a reader will copy whole.
When not to use
- Emphasis. Code styling says this is code, so using it for stress makes ordinary words look typeable.
- A product or feature name, which is prose.
- A long listing with no explanation. Code a reader cannot place is not documentation.
Guidance
Do
Set
--wr-surface to change the page ground.Use inline code for the exact thing to be typed, and leave the sentence around it in prose.
Don't
Set
the page background to change the page ground.Do not put prose in code. It suggests the words themselves are something to type.
Intensity
What each of this component's grounds spends, measured against the ladder in both themes.
| Appearance | Ground | Light | Dark |
|---|---|---|---|
| code | neutral | 0.042Ambient | 0.066Substrate |
Substrate, Ambient and Marked are measured. Directed depends on what else is in the region, and Demanded is declared and rationed, so neither is a property this component carries by itself. See intensity.
Content
What to write, and what to leave out.
- Write the value exactly, including its punctuation and case.
- Keep a block to what the reader needs. A shorter listing is read and a longer one is skipped.
- Say what a block does before showing it, because code does not introduce itself.