Title / Description
Code require 'css_parser' class InlineStyle class CssParserWrapper attr_accessor :rules def initialize(css_code) parser, @rules = CssParser::Parser.new, [] parser.add_block! css_code parser.each_rule_set do |rule_set| rule_set.each_selector { |sel, dec, spec| @rules << Rule.new(sel, dec, '%04d' % spec.to_i) } end end end end
Author
Highlight as C C++ CSS Clojure Delphi ERb Groovy (beta) HAML HTML JSON Java JavaScript PHP Plain text Python Ruby SQL XML YAML diff code