Class: CSSPool::Visitors::ToCSS

Inherits:
Visitor
  • Object
show all
Defined in:
lib/csspool/visitors/to_css.rb

Direct Known Subclasses

ToMinifiedCSS

Constant Summary collapse

CSS_IDENTIFIER_ILLEGAL_CHARACTERS =
(0..255).to_a.pack('U*').gsub(/[a-zA-Z0-9_-]/, '')
CSS_STRING_ESCAPE_MAP =
{
  "\\" => "\\\\",
  "\"" => "\\\"",
  "\n" => "\\a ", # CSS2 4.1.3 p3.2
  "\r" => "\\\r",
  "\f" => "\\\f"
}

Instance Method Summary collapse

Methods inherited from Visitor

#accept, visitor_for

Constructor Details

#initializeToCSS

Returns a new instance of ToCSS.



15
16
17
18
# File 'lib/csspool/visitors/to_css.rb', line 15

def initialize
  @indent_level = 0
  @indent_space = indent_space
end