mirror of
https://github.com/haml/haml.git
synced 2022-11-09 12:33:31 -05:00
Sass attribute nodes can have their value and sub-attribute values both set.
git-svn-id: svn://hamptoncatlin.com/haml/trunk@438 7063305b-7217-0410-af8c-cdc13e5119b9
This commit is contained in:
parent
52269a15d1
commit
30e4560c3c
3 changed files with 20 additions and 17 deletions
|
@ -15,24 +15,26 @@ module Sass::Tree
|
|||
end
|
||||
real_name = name
|
||||
real_name = "#{parent_name}-#{real_name}" if parent_name
|
||||
if children.size > 0
|
||||
to_return = String.new
|
||||
children.each do |kid|
|
||||
if @style == :compact
|
||||
to_return << "#{kid.to_s(real_name)} "
|
||||
else
|
||||
to_return << "#{kid.to_s(real_name)}\n"
|
||||
end
|
||||
end
|
||||
to_return << "\n" unless @style == :compact
|
||||
to_return[0...-1]
|
||||
else
|
||||
if value.length < 1
|
||||
raise Sass::SyntaxError.new("Invalid attribute: #{declaration.dump}", @line)
|
||||
end
|
||||
|
||||
"#{real_name}: #{value};"
|
||||
if value.empty? && children.empty?
|
||||
raise Sass::SyntaxError.new("Invalid attribute: #{declaration.dump}", @line)
|
||||
end
|
||||
|
||||
join_string = @style == :compact ? ' ' : "\n"
|
||||
to_return = ''
|
||||
if !value.empty?
|
||||
to_return << "#{real_name}: #{value};#{join_string}"
|
||||
end
|
||||
|
||||
children.each do |kid|
|
||||
if @style == :compact
|
||||
to_return << "#{kid.to_s(real_name)} "
|
||||
else
|
||||
to_return << "#{kid.to_s(real_name)}\n"
|
||||
end
|
||||
end
|
||||
to_return << "\n" unless children.empty? || @style == :compact
|
||||
to_return[0...-1]
|
||||
end
|
||||
|
||||
private
|
||||
|
|
|
@ -33,7 +33,7 @@ body { margin: 0; font: 0.85em "Lucida Grande", "Trebuchet MS", Verdana, sans-se
|
|||
#content .container.video .column.left { width: 200px; }
|
||||
#content .container.video .column.left .box { margin-top: 10px; }
|
||||
#content .container.video .column.left .box p { margin: 0 1em auto 1em; }
|
||||
#content .container.video .column.left .box.participants img { float: left; margin: 0 1em auto 1em; border: 1px solid #6e000d; }
|
||||
#content .container.video .column.left .box.participants img { float: left; margin: 0 1em auto 1em; border: 1px solid #6e000d; border-style: solid; }
|
||||
#content .container.video .column.left .box.participants h2 { margin: 0 0 10px 0; padding: 0.5em; /* The background image is a gif! */ background: #6e000d url(/images/hdr_participant.gif) 2px 2px no-repeat; text-indent: -9999px; border-top-width: 5px; border-top-style: solid; border-top-color: #a20013; border-right-width: 1px; border-right-style: dotted; }
|
||||
#content .container.video .column.middle { width: 500px; }
|
||||
#content .container.video .column.right { width: 200px; }
|
||||
|
|
|
@ -127,6 +127,7 @@ body
|
|||
:float left
|
||||
:margin 0 1em auto 1em
|
||||
:border 1px solid #6e000d
|
||||
:style solid
|
||||
h2
|
||||
:margin 0 0 10px 0
|
||||
:padding 0.5em
|
||||
|
|
Loading…
Add table
Reference in a new issue