Skip to content

Commit

Permalink
fix(styles): Add break-word property on code/pre blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
oswaldoacauan committed Nov 12, 2013
1 parent bdd9ef0 commit 904e6b5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/assets/_scss/vendor/_prism.scss
Expand Up @@ -2,6 +2,8 @@ code[class*="language-"],
pre[class*="language-"] {
font-size: 14px;
max-width: 100%;
word-wrap: break-word;
word-break: break-all;
}

pre[class*=language-] {
Expand Down

5 comments on commit 904e6b5

@digitaljhelms
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't imaging automagic line-breaks are desired in code snippets, but before I submit a PR, was there an intentional reason for doing this that I'm missing?

@oswaldoacauan
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mobile devices, if you have a better solution told me :D

@digitaljhelms
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally, if I'm looking at pre-formatted text, I don't want forced line-breaks -- it's pre-formatted for a reason. I think allowing the horizontal overflow to scroll on the element is the best idea, or (if the RWD word-wrap support must remain) wrap these lines in a media-query. Thoughts?

@oswaldoacauan
Copy link
Owner Author

@oswaldoacauan oswaldoacauan commented on 904e6b5 Dec 13, 2013 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@digitaljhelms
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See #36 🍻

Please sign in to comment.