Method: Sass::Script::Functions#is_superselector
- Defined in:
- lib/sass/script/functions.rb
#is_superselector($super, $sub) ⇒ Sass::Script::Value::Bool
Returns whether $super is a superselector of $sub. This means that
$super matches all the elements that $sub matches, as well as possibly
additional elements. In general, simpler selectors tend to be
superselectors of more complex oned.
2883 2884 2885 2886 2887 |
# File 'lib/sass/script/functions.rb', line 2883
def is_superselector(sup, sub)
sup = parse_selector(sup, :super)
sub = parse_selector(sub, :sub)
bool(sup.superselector?(sub))
end
|