Convert haml-style.css to Sass.

This commit is contained in:
Nathan Weizenbaum 2009-06-19 00:28:21 -07:00
parent 32f0b57100
commit b2cd2a1a8d
3 changed files with 27 additions and 36 deletions

View File

@ -1,3 +1,5 @@
require File.dirname(__FILE__) + "/../lib/sass"
class YARD::Generators::FullDocGenerator
protected
@ -6,8 +8,9 @@ class YARD::Generators::FullDocGenerator
if format == :html && serializer
template_file = find_template template_path(css_file)
serializer.serialize(css_file,
File.read(template_file) + File.read(File.dirname(__FILE__) + "/haml-style.css"))
haml_style = Sass::Engine.new(File.read(
File.dirname(__FILE__) + "/haml-style.sass")).render
serializer.serialize(css_file, File.read(template_file) + haml_style)
end
true

View File

@ -1,34 +0,0 @@
.maruku_toc {
background: #ddd;
border: 1px solid #ccc;
margin-right: 2em;
float: left;
}
.maruku_toc ul {
padding: 0 1em;
}
#frequently_asked_questions + .maruku_toc {
float: none;
margin: 0 2em;
}
.section.readme :target,
.section.readme dt:target + dd {
background-color: #ccf;
border: 1px solid #88b;
}
.section.readme dd {
margin-left: 0;
padding-left: 3em;
}
.section.readme dt:target + dd {
border-top-style: none;
}
.section.readme dt:target {
border-bottom-style: none;
}

22
yard/haml-style.sass Normal file
View File

@ -0,0 +1,22 @@
.maruku_toc
background: #ddd
border: 1px solid #ccc
margin-right: 2em
float: left
ul
padding: 0 1em
#frequently_asked_questions + &
float: none
margin: 0 2em
.section.readme
*:target, dt:target + dd
background-color: #ccf
border: 1px solid #88b
dd
margin-left: 0
padding-left: 3em
dt:target
border-bottom-style: none
& + dd
border-top-style: none