module Crass

A CSS parser based on the CSS Syntax Module Level 3 spec.

Constants

VERSION

Public Class Methods

parse(input, options = {}) click to toggle source

Parses input as a CSS stylesheet and returns a parse tree.

See {Tokenizer#initialize} for options.

# File lib/crass.rb, line 10
def self.parse(input, options = {})
  Parser.parse_stylesheet(input, options)
end
parse_properties(input, options = {}) click to toggle source

Parses input as a string of CSS properties (such as the contents of an HTML element's `style` attribute) and returns a parse tree.

See {Tokenizer#initialize} for options.

# File lib/crass.rb, line 18
def self.parse_properties(input, options = {})
  Parser.parse_properties(input, options)
end