Files

CSSPool::CSS::DocumentHandler

Attributes

document[RW]

(Not documented)

Public Class Methods

new() click to toggle source

(Not documented)

# File lib/csspool/css/document_handler.rb, line 6
      def initialize
        @document     = nil
        @media_stack  = []
      end

Public Instance Methods

charset(name, location) click to toggle source

(Not documented)

# File lib/csspool/css/document_handler.rb, line 15
      def charset name, location
        @document.charsets << CSS::Charset.new(name, location)
      end
end_media(media_list, parse_location) click to toggle source

(Not documented)

# File lib/csspool/css/document_handler.rb, line 46
      def end_media media_list, parse_location
        @media_stack.pop
      end
import_style(media_list, uri, ns, loc) click to toggle source

(Not documented)

# File lib/csspool/css/document_handler.rb, line 19
      def import_style media_list, uri, ns, loc
        @document.import_rules << CSS::ImportRule.new(
          uri,
          ns,
          media_list.map { |x| CSS::Media.new(x, loc) },
          @document,
          loc
        )
      end
property(name, exp, important) click to toggle source

(Not documented)

# File lib/csspool/css/document_handler.rb, line 37
      def property name, exp, important
        rs = @document.rule_sets.last
        rs.declarations << Declaration.new(name, exp, important, rs)
      end
start_document() click to toggle source

(Not documented)

# File lib/csspool/css/document_handler.rb, line 11
      def start_document
        @document = CSSPool::CSS::Document.new
      end
start_media(media_list, parse_location) click to toggle source

(Not documented)

# File lib/csspool/css/document_handler.rb, line 42
      def start_media media_list, parse_location
        @media_stack << media_list.map { |x| CSS::Media.new(x, parse_location) }
      end
start_selector(selector_list) click to toggle source

(Not documented)

# File lib/csspool/css/document_handler.rb, line 29
      def start_selector selector_list
        @document.rule_sets << RuleSet.new(
          selector_list,
          [],
          @media_stack.last || []
        )
      end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.