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

!^ and ^ are inconsistent (or last-child needs its own combinator) #49

Open
Inviz opened this issue Aug 18, 2011 · 0 comments
Open

!^ and ^ are inconsistent (or last-child needs its own combinator) #49

Inviz opened this issue Aug 18, 2011 · 0 comments

Comments

@Inviz
Copy link

Inviz commented Aug 18, 2011

Sorry for messy formatting.

[1:03pm] Inviz: Do you guys think '^' and '!^' combinators in slick (first & last child) are inconsistent compared to other combinators?
[1:03pm] Inviz: Other combinators like ' ', '+', '~' can be inverted to match from child to parent
[1:05pm] Inviz: while inverting ^ and !^ does not reverse the matching logic, it reverses the first-last child semantic
[1:08pm] Inviz: Slick.find(ul, 'li') //li Slick.find(li, Slick.parse('li').reverse()) //ul
[1:08pm] Inviz: that works transitively for all combinators
[1:09pm] Inviz: ^ li reverses to li !^ *
[1:09pm] Inviz: and grabs last child of LI
[1:10pm] Inviz: the correct way here would be to make !^ return parent IF current node is first node
[1:10pm] Inviz: but then last-child combinator needs its own combinator

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

No branches or pull requests

1 participant