Skip to content

Commit 03f6613

Browse files
authored
Merge pull request #289 from petrelharp/cssref
CSS quick reference
2 parents 06b329d + e26f4f0 commit 03f6613

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

viz.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -448,6 +448,23 @@ the `tree` group contains the ID of the tree (e.g. `t0`), the `site` group on th
448448
contains the site ID (e.g. `s15`) the `mut` class contains the mutation ID (e.g. `m16`),
449449
and so on.
450450

451+
#### CSS selector quick reference
452+
453+
If you don't do this all the time it's not easy to remember what the various separators
454+
mean, so here's a quick reference (for more, see
455+
[these docs](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_selectors)):
456+
457+
- `abc` (Type `abc`, like `g` for a `<g>...</g>` tag)
458+
- `.xyz` (Class `xyz`)
459+
- `#uvw` (ID `uvw`)
460+
- `,` (Selector list, means "or")
461+
- `>` (Child combinator)
462+
- "` `" (Descendant combinator, a space)
463+
- `+` (Next-sibling combinator)
464+
- `~` (Subsequent sibling combinator)
465+
- `|` (Namespace separator)
466+
467+
451468
#### Styling graphical elements
452469

453470
The classes above make it easy to target specific nodes or edges in one or multiple

0 commit comments

Comments
 (0)