-
Notifications
You must be signed in to change notification settings - Fork 112
Description
Hi All,
I noticed the current CSS shipped with this repo doesn't respond well on mobile/tablet devise.
To fix, follow the steps below:
- Add this to your CSS:
/* Wraps the pre element /
pre {
white-space: pre-wrap; / css-3 /
white-space: -moz-pre-wrap; / Mozilla, since 1999 /
white-space: -pre-wrap; / Opera 4-6 /
white-space: -o-pre-wrap; / Opera 7 /
word-wrap: break-word; / Internet Explorer 5.5+ */
}
/* Displays a scroll bar */
::-webkit-scrollbar {
-webkit-appearance: none;
margin-top: 10px;
width: 7px;
height: 8px;
background-color: #eee;
border-radius: 4px;
}
::-webkit-scrollbar-thumb {
border-radius: 4px;
height: 10px;
background-color: rgba(0,0,0,.5);
-webkit-box-shadow: 0 0 1px rgba(255,255,255,.5);
}
-
In your app helper file for CodeRay options, ensure the block_code options :line_numbers are set to :inline, like below:
class CodeRayify < Redcarpet::Render::HTML
def block_code(code, language)
CodeRay.scan(code, language).div(:line_numbers => :inline)
end
end