lib/roadie/inliner.rb
# Regexp matching all the url() declarations in CSS
#
# It matches without any quotes and with both single and double quotes
# inside the parenthesis. There's much room for improvement, of course.
Regexp matching all the url() declarations in CSS
It matches without any quotes and with both single and double quotes
inside the parenthesis. There's much room for improvement, of course.
Regexp matching all the url () declarations in CSS It matches without any quotes and with both single and double quotes inside the parenthesis . There ' s much room for improvement of course .
def elements_with_declarations
        Hash.new { |hash, key| hash[key] = [] }.tap do |element_declarations|
          parsed_css.each_rule_set do |rule_set|
            each_selector_without_psuedo(rule_set) do |selector, specificity|
              each_element_in_selector(selector) do |element|
                style_declarations_in_rule_set(specificity, rule_set) do |declaration|
                  element_declarations[element] << declaration
                end
              end
            end
          end
        end
      end
def elements_with_declarations Hash . new { | hash , key | hash [ key ] = [ ] } . tap do | element_declarations | parsed_css . each_rule_set do | rule_set | each_selector_without_psuedo ( rule_set ) do | selector , specificity | each_element_in_selector ( selector ) do | element | style_declarations_in_rule_set ( specificity , rule_set ) do | declaration | element_declarations [ element ] << declaration end end end end end end
Regexp matching all the url() declarations in CSS
It matches without any quotes and with both single and double quotes
inside the parenthesis.
Regexp matching all the url () declarations in CSS It matches without any quotes and with both single and double quotes inside the parenthesis .