nodejh / hugo-theme-mini

A fast, minimalist and responsive hugo theme for bloggers.
http://nodejh.github.io/hugo-theme-mini
MIT License
738 stars 328 forks source link

Font size issues in code blocks on mobile #130

Closed xNaCly closed 2 years ago

xNaCly commented 2 years ago

https://xnacly.github.io/blog/posts/2022/rss_parser/ mobile: image PC: image

Any way to fix this?

xNaCly commented 2 years ago

It should be noted that this issue only happens on ios devices due to safaris flex blox implementation changing font sizes

People facing the same issue can be helped by setting the following values on code elements:

/* this should fix the ios mobile code blog font size bug
 * recorded here: https://github.com/adityatelange/hugo-PaperMod/issues/828 */
code {
    text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
}

Code taken from https://github.com/xNaCly/hugo-theme-mini/blob/master/static/css/style.css

Fix found at: https://github.com/adityatelange/hugo-PaperMod/issues/828