Skip to content

Add feature that the ':only-child' pseudo class should work even though it's in ':not' pseudo class. #858

merged 1 commit into from Jun 14, 2013

2 participants

ykzts commented Mar 12, 2013

cite: 6.6.7. The negation pseudo-class in specification

The negation pseudo-class, :not(X), is a functional notation taking a simple selector (excluding the negation pseudo-class itself) as an argument. It represents an element that is not represented by its argument.

Also contain a :only-child pseudo class.

ykzts commented Mar 12, 2013


Nokogiri::CSS.xpath_for '*:not(:only-child)' # => ["//*[not(only-child(.))]"] 

merged this commit:

Nokogiri::CSS.xpath_for '*:not(:only-child)' # => ["//*[not(last() = 1)]"]
@leejarvis leejarvis merged commit d1b0afd into sparklemotion:master Jun 14, 2013

1 check failed

Details default The Travis build could not complete due to an error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.