Skip to content

Commit

Permalink
add minimal docs on highlighting
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewpbray committed Aug 6, 2024
1 parent 2176f60 commit c24d171
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions docs/guide/index.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,19 @@ When this paragraph scrolls into view it will reveal my sticky. @cr-mysticky

The reference can be placed anywhere in the paragraph, but it should be separated from other content by spaces.

# Trigger Effects

## Highlighting

You can highlight parts of the code and text of your sticky using the following syntax.

1. `highlight="1,3"`: highlight lines 1 and 3
2. `highlight="1-3"`: highlight lines 1, 2, and 3
3. `highlight="cr-span1"`: highlight the span with id `cr-span1`
4. `highlight="cr-span1,cr-span2"`: highlight the spans with ids `cr-span1` and `cr-span2`

Line highlighting (1 and 2) works on code cells and line blocks while span highlighting (3 and 4) only works on Line Blocks.

# Layouts

The relative positioning of the narrative column and the sticky column determine the *layout*. You can set the layout of a section using the `layout` attribute on the block that defines the section.
Expand Down

0 comments on commit c24d171

Please sign in to comment.