This project is archived and is in readonly mode.

#1176 ✓wontfix
Sanford Whiteman

:not pseudo selector should *not* accept a group of selectors

Reported by Sanford Whiteman | February 14th, 2011 @ 07:37 PM | in 1.3.1 (closed)

Looks like the :not pseudo as emulated by Slick accepts a group of selectors, i.e.

:not(.myclass,.myotherclass)

This doesn't match with the working CSS 3 spec, which says (http://www.w3.org/TR/css3-selectors/#negation)

The negation pseudo-class, :not(X), is a functional notation taking a simple selector

In CSS 3, simple selector can be

.myclass.myotherclass

but not

.myclass,.myotherclass

because the latter is a "group of selectors."

Indeed, you can't pass the group of selectors example to the native querySelectorAll (you get a DOM syntax error in webkit, for example), meaning you can never optimize this selector by passing it to native qSA code (assuming that is an eventual possibility).

Comments and changes to this ticket

  • Arian

    Arian February 14th, 2011 @ 08:23 PM

    • State changed from “new” to “open”
    • Milestone set to 1.3.1
    • Assigned user set to “Fábio M. Costa”
    • Milestone order changed from “886” to “0”
  • Fábio M. Costa

    Fábio M. Costa February 14th, 2011 @ 11:51 PM

    • State changed from “open” to “wontfix”
    • Tag set to slick selector

    We are not inclined to remove this feature. We know it's on the standards, but it's not a strange behavior, it's something that ppl would expect from this selector.

  • Sanford Whiteman

    Sanford Whiteman February 15th, 2011 @ 12:15 AM

    Mmm, I don't think standards-savvy people would have any reason to expect it to work (it definitely doesn't "look right" IMO) since it's explicitly prohibited and won't work in a stylesheet. Guess no harm done if nobody tries it! Or if you ever try optimizing to querySelectorAll, you could detect the DOM_SYNTAX_ERROR and then rerun it through the JS-only parser... ?

  • Fábio M. Costa

    Fábio M. Costa February 19th, 2011 @ 12:49 AM

    It is how it works today.
    Thank you!

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Shared Ticket Bins

Pages