This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* :any(selector) | |
* requires Slick | |
* originally implemented by Firefox as :-moz-any() | |
* also supported by webkit as :webkit-any() | |
* example: | |
* :any(p, section) :any(pre, code) -- selects a pre or code tag in a p or section | |
* p pre, p code, section pre, section code -- same, but longer and less readable | |
*/ | |
Slick.definePseudo('any', function(arg) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* :has-n-children([<|>|<=|>=]n) | |
* requires Slick | |
* selects elements with (less/more than (or equal to)) n elements as children | |
* doesn't work yet (tested with 1.1.5) | |
*/ | |
Slick.definePseudo('has-n-children', function(arg) { | |
var childrenLen = Slick.search(this, '> *').length; | |
var parsedArg = arg.match(/(<|>|<=|>=)?(\d+)/); | |
switch(parsedArg[1]) { |