comark-annotate
Theming
The mark colors, the handwriting, the room for side notes, and the classes of screenshots and comparisons.
Screenshots and comparisons follow the page's theme through the shared tokens. The mark colors are separate from the theme, because each one means something. The rules sit in a comark CSS layer, so any plain rule of your own wins. ::diff is in comark-diff, which has its own Theming page.
Shared tokens
Annotate reads these shared tokens:
| Token | Used for |
|---|---|
--comark-background |
The Copy button, the slider's line and grip, the ring around stamps |
--comark-foreground |
The Copy button's icon, the slider's grip, the status after a copy |
--comark-border |
The outline around screenshots, the Copy button, the slider's grip |
--comark-accent |
The hovered Copy button |
--comark-ring |
Focus rings |
--comark-radius |
Corners of screenshots and notes |
--comark-font |
Stamp numbers, the status after a copy |
Variables
Set them on .ca, the root of every block:
| Variable | Default | Used for |
|---|---|---|
--ca-color |
var(--ca-blue) |
Marks, arrows, and notes without a color |
--ca-solid |
var(--ca-blue-solid) |
Their stamps, and their strokes in dark mode |
--ca-ink |
var(--ca-blue-ink) |
The number on their stamps |
--ca-red to --ca-gray |
#ee3533, #f5a524, #259f56, #0581e6, #71717a, lighter in dark mode |
Marks, arrows, and notes in red, amber, green, blue, and gray |
--ca-red-solid to --ca-gray-solid |
#d01d21, #f59e0b, #037e3f, #0267c7, #52525b |
Stamps in each named color, and its strokes in dark mode |
--ca-red-ink to --ca-gray-ink |
#fff, and #1c1917 for amber |
The number on a stamp in each named color |
--ca-ring |
--comark-background |
The ring that parts a stamp from the screenshot |
--ca-note-font |
comark-caveat, cursive |
Side notes and titles. inherit uses the page font. |
--ca-note-size |
1.25em |
Side notes |
--ca-label-size |
1.5em |
A screenshot's title |
--ca-gutter |
10rem |
The room beside the image for side="left" and side="right" notes |
--ca-top-gutter |
5rem |
The room above the image for side="top" notes |
--ca-gap |
1.25rem |
The space between a side note and the image, where its arrow runs |
An annotation's color sets --ca-color, --ca-solid, and --ca-ink on its own mark and note, so it wins over .ca. Caveat comes inlined with the styles, about 32 KB once per page.
Classes
- Every block sits in a
.ca: a screenshot'sfigure.ca-screenshotinside it, and.ca.ca-comparefor a compare (plus.ca-sliderwithmode="slider"). - A screenshot holds
.ca-headingwith its title in.ca-label, then.ca-stagewith the image in.ca-frame, and afigcaptionwith the notes inol.ca-notes. It has.ca-left,.ca-right, or.ca-topwhen it has side notes there. - A mark is a
.ca-markwith its shape as a class, such as.ca-boxor.ca-circle, and its number in.ca-stamp. A side note is a.ca-calloutwith its arrow in.ca-arrow. A mark, its arrow, and its note share adata-n. - The Copy button is
.ca-copy. A slider's divider is.ca-handle, with its knob in.ca-grip.
.ca {
--ca-color: #0070f3;
--ca-solid: #0070f3;
--ca-ink: #fff;
--ca-note-font: inherit;
}