Module: Sass::Script::HasSimpleCrossBrowserFunctionSupport

Included in:
CrossBrowserFunctionCall, Funcall
Defined in:
lib/compass/core/sass_extensions/monkey_patches/browser_support.rb

Instance Method Summary collapse

Instance Method Details

#has_aspect?(children = nil) ⇒ Boolean

Returns:

  • (Boolean)


41
42
43
44
45
# File 'lib/compass/core/sass_extensions/monkey_patches/browser_support.rb', line 41

def has_aspect?(children = nil)
  children ||= self.children
  return true if Compass::BrowserSupport.has_aspect?(name)
  children.any? {|child| child.respond_to?(:has_aspect?) && child.has_aspect? }
end

#supports?(aspect) ⇒ Boolean

Returns:

  • (Boolean)


36
37
38
39
# File 'lib/compass/core/sass_extensions/monkey_patches/browser_support.rb', line 36

def supports?(aspect)
  return true if Compass::BrowserSupport.supports?(name, aspect)
  children.any? {|child| child.respond_to?(:supports?) && child.supports?(aspect) }
end