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

[Sass] Fix some more cssize documentation.

This commit is contained in:
Nathan Weizenbaum 2009-11-25 01:53:32 -08:00
parent 9d84f77ce4
commit bb26ab6680

View file

@ -82,10 +82,8 @@ module Sass::Tree
# Converts nested properties into flat properties. # Converts nested properties into flat properties.
# #
# @param parent_name [String, nil] The name of the parent property, # @param parent [PropNode, nil] The parent node of this node,
# or nil if there is none # or nil if the parent isn't a {PropNode}
# @param tabs [Fixnum] How deeply this property is nested.
# See \{#tabs}
def _cssize(parent) def _cssize(parent)
node = super node = super
result = node.children.dup result = node.children.dup
@ -96,8 +94,8 @@ module Sass::Tree
# Updates the name and indentation of this node based on the parent name # Updates the name and indentation of this node based on the parent name
# and nesting level. # and nesting level.
# #
# @param parent_name [String, nil] The name of the parent property, if one exists # @param parent [PropNode, nil] The parent node of this node,
# @param tabs [Fixnum] The extra indentation to use for this property # or nil if the parent isn't a {PropNode}
def cssize!(parent) def cssize!(parent)
self.name = "#{parent.name}-#{name}" if parent self.name = "#{parent.name}-#{name}" if parent
self.tabs = parent.tabs + (parent.value.empty? ? 0 : 1) if parent && style == :nested self.tabs = parent.tabs + (parent.value.empty? ? 0 : 1) if parent && style == :nested