Currently our code syntax highlighting is intended only for usage in light theme, and is not legible on dark theme.
We should introduce theme support to the syntax highlighting mixin to use the existing Prism theme on light theme, and the "Tomorrow Night" Prism theme on dark theme.
Context
The code below hard-codes colors from Prism's default theme into Vanilla. It should be updated to vary based in color theme, so that the "Tomorrow Night" theme is applied when an element is a descendant of an is-dark element.
Currently our code syntax highlighting is intended only for usage in light theme, and is not legible on dark theme.
We should introduce theme support to the syntax highlighting mixin to use the existing Prism theme on light theme, and the "Tomorrow Night" Prism theme on dark theme.
Context
The code below hard-codes colors from Prism's default theme into Vanilla. It should be updated to vary based in color theme, so that the "Tomorrow Night" theme is applied when an element is a descendant of an
is-dark
element.https://github.com/canonical/vanilla-framework/blob/80fddaa1a1b0c41bfdf6977105093a70213d3cd7/scss/_base_syntax-highlighting.scss#L27-L69
Resources