1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

fixes scroll beyond the box in code blocks (fix suggested by toretore)

This commit is contained in:
Xavier Noria 2009-02-25 00:59:37 +01:00
parent d5fb579143
commit 7d773a17a4
2 changed files with 6 additions and 3 deletions

View file

@ -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;
}

View file

@ -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