lib/css_parser.rb in css_parser-1.2.2 vs lib/css_parser.rb in css_parser-1.2.3

- old
+ new

@@ -6,11 +6,11 @@ require 'zlib' require 'stringio' require 'iconv' module CssParser - VERSION = '1.2.2' + VERSION = '1.2.3' # Merge multiple CSS RuleSets by cascading according to the CSS 2.1 cascading rules # (http://www.w3.org/TR/REC-CSS2/cascade.html#cascading-order). # # Takes one or more RuleSet objects. @@ -149,9 +149,15 @@ uri = base_uri + uri rescue; end end "url('#{uri.to_s}')" end + end + + def self.sanitize_media_query(raw) + mq = raw.to_s.gsub(/[\s]+/, ' ').strip + mq = 'all' if mq.empty? + mq.to_sym end end require File.dirname(__FILE__) + '/css_parser/rule_set' require File.dirname(__FILE__) + '/css_parser/regexps'