Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Jun 14, 2013

Conversation

ykzts
Copy link
Contributor

@ykzts 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
Copy link
Contributor Author

ykzts commented Mar 12, 2013

currently:

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

merged this commit:

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

leejarvis added a commit that referenced this pull request Jun 14, 2013
Add feature that the ':only-child' pseudo class should work even though it's in ':not' pseudo class.
@leejarvis leejarvis merged commit d1b0afd into sparklemotion:master Jun 14, 2013
@ykzts ykzts deleted the feature/not-only-child branch June 11, 2017 23:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants