carpentries / varnish

Template for pkgdown site
https://carpentries.github.io/varnish/
Other
7 stars 25 forks source link

ensure code in callouts is accessible #99

Closed zkamvar closed 10 months ago

zkamvar commented 10 months ago

Hi all. The CSS of the code block declaration in bootstrap is overridden by the syntax-highlighting.scss class in varnish. @ErinBecker is correct that inheritance is in play here, but as the syntax-highlighting.scss inherits from the bootstrap code class, but doesn't specify its own color, then it will inherit the bootstrap color. We can override this by adding a specific color property in the syntax-highlighting.scss class: image

Originally posted by @froggleston in https://github.com/carpentries/workbench/issues/76#issuecomment-1794740161

We could also specify a background colour (#FFF) for the code instead of modifying the established palette so that we ensure it's accessible everywhere