alanorth / hugo-theme-bootstrap4-blog

A blogging-centric Bootstrap v4 theme for the Hugo static site generator.
Other
204 stars 132 forks source link

add a little padding around a code block #63

Closed xenoterracide closed 7 years ago

xenoterracide commented 7 years ago

if you have formatted code in a post it's a little ugly because it goes from a white background to a grey with no space around the characters so they're right at the edge, this fixes that.

if you want to play with it in a browser, this post of mine has lots of code https://xenoterracide.com/post/single-repository-one-aggregate/

alanorth commented 7 years ago

Which kind of code blocks is this for? I tried it with triple-fenced code but there was no grey background.

xenoterracide commented 7 years ago

ah yeah, the coloring is probably due to the pygments theme, though I imagine the effect is similar for other themes

PygmentsCodeFences = true
PygmentsStyle = "manni"
alanorth commented 7 years ago

Seems it's only for code blocks using the {{< highlight >}} shortcode. I tested your changes and I see they are subtle but it is indeed an improvement. Thanks! 🎉