lukeorth / poison

Professional Hugo theme for dev bloggers. Based on Mdo's classic Hyde theme.
https://poison.lukeorth.com
GNU General Public License v3.0
199 stars 98 forks source link

code content overflowing on mobile #139

Closed rawwerks closed 10 months ago

rawwerks commented 11 months ago

today i noticed that the code blocks overflow off to the right on mobile:

image

i was able to fix it with this overwrite (in custom.css)

.content pre code {
  max-width: 100%;
  overflow-x: auto;
  word-break: normal;
  word-wrap: normal;
  white-space: pre-wrap;
}

since some of these CSS overwrites might not be desired, i will let @lukeorth decide how to fix this. it's a little confusing to me, since this is set "in stages" by hyde.css, poole.css, and poison.css.

lukeorth commented 10 months ago

Hi, @rawwerks -- thanks for reporting this.

It's interesting that you prefer the code to be wrapped. I actually prefer for it to overflow horizontally with the option to scroll, but can understand how people might have differing opinions. :wink:

I think for the time being I'll leave it as is. However, I do think this can be useful to others that want to customize their CSS to a different taste. :+1: