mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
fixes scroll beyond the box in code blocks (fix suggested by toretore)
This commit is contained in:
@@ -369,11 +369,14 @@ tt {
|
||||
font-size: 0.9em;
|
||||
}
|
||||
|
||||
div.code_container {
|
||||
background: #EEE url(../../images/tab_grey.gif) no-repeat left top;
|
||||
padding: 0.25em 1em 0.5em 48px;
|
||||
}
|
||||
|
||||
code {
|
||||
font-family: monaco, "Bitstream Vera Sans Mono", "Courier New", courier, monospace;
|
||||
background: #EEE url(../../images/tab_grey.gif) no-repeat left top;
|
||||
border: none;
|
||||
padding: 0.25em 1em 0.5em 48px;
|
||||
margin: 0.25em 0 1.5em 0;
|
||||
display: block;
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ module RailsGuides
|
||||
body.gsub!(/\<(yaml|shell|ruby|erb|html|sql)\>(.*?)\<\/\1\>/m) do |m|
|
||||
es = ERB::Util.h($2)
|
||||
css_class = ['erb', 'shell'].include?($1) ? 'html' : $1
|
||||
"<notextile><code class='#{css_class}'>#{es}\n</code></notextile>"
|
||||
%{<notextile><div class="code_container"><code class="#{css_class}">#{es}\n</code></div></notextile>}
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user