diff options
author | Xavier Noria <fxn@hashref.com> | 2009-02-25 00:59:37 +0100 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2009-02-25 00:59:37 +0100 |
commit | 7d773a17a48376f1ccc0b7ea148625acc421b396 (patch) | |
tree | 0f59c97a20a3055633b23ce406180ab7bde4ec5b /railties/guides | |
parent | d5fb5791433a9c1492e75151e86ec001b65663e8 (diff) | |
download | rails-7d773a17a48376f1ccc0b7ea148625acc421b396.tar.gz rails-7d773a17a48376f1ccc0b7ea148625acc421b396.tar.bz2 rails-7d773a17a48376f1ccc0b7ea148625acc421b396.zip |
fixes scroll beyond the box in code blocks (fix suggested by toretore)
Diffstat (limited to 'railties/guides')
-rw-r--r-- | railties/guides/files/stylesheets/main.css | 7 | ||||
-rw-r--r-- | railties/guides/rails_guides/textile_extensions.rb | 2 |
2 files changed, 6 insertions, 3 deletions
diff --git a/railties/guides/files/stylesheets/main.css b/railties/guides/files/stylesheets/main.css index de6e26647b..1e006adf6e 100644 --- a/railties/guides/files/stylesheets/main.css +++ b/railties/guides/files/stylesheets/main.css @@ -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; } diff --git a/railties/guides/rails_guides/textile_extensions.rb b/railties/guides/rails_guides/textile_extensions.rb index 7ebbf0090e..460dab18c3 100644 --- a/railties/guides/rails_guides/textile_extensions.rb +++ b/railties/guides/rails_guides/textile_extensions.rb @@ -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 |