Highlight code by dimming the rest

Right now highlighting works by actual highlighting

```rust,hl_lines=1 3-5 9

This can be too overwhelming whith syntax highlighting enabled.

There is an alternative approach.
We can dim not highlighted code.

Revealjs has a good example baked in

I believe you should be able to do that via CSS with the current code?

This might be possible but I have no idea how to achieve this =\

Right now highlighting works by wrapping a line in a mark with background-color:#65737e30; style. (default value from base16-ocean-dark is used)

This allows to lower the brightness for pre and turn in back up for pre mark.
Unfortunately, cascading doesn’t play well with cancelling filters and due to having close to zero CSS experience, I don’t see an alternative.

Also I’m unable to override background-color is CSS because it’s defined explicitly in mark. Does it mean that a custom version of a highlighting theme is needed to make it similar to the rest of the code?

First part seems to be easy:

pre span {
  filter: brightness(70%);
}
pre mark span {
  filter: brightness(100%);
}

This way the rest of the code is dimmed while highlighted parts are still highlighted.


The problem of a custom theme prevails =\