|
View:
New views
20 Messages
—
Rating Filter:
Alert me
|
| < Prev | 1 - 2 | Next > |
|
|
[css3-selectors] minor question about :not()in 6.6.7: "The negation pseudo-class, :not(X), is a functional notation taking a simple selector (excluding the negation pseudo-class itself and pseudo-elements) as an argument." so, :not(:pseudo-element) - allowed by formal grammar - is invalid selector or "useless" selector, as foo:not(bar) ? |
|
|
Re: [css3-selectors] minor question about :not()On Thu, Mar 12, 2009 at 12:40 PM, Andrey Mikhalev
<amikhal@...> wrote: > > in 6.6.7: > "The negation pseudo-class, :not(X), is a functional notation taking a > simple selector (excluding the negation pseudo-class itself and > pseudo-elements) as an argument." > > so, :not(:pseudo-element) - allowed by formal grammar - > is invalid selector or "useless" selector, as foo:not(bar) ? In general, the formal grammar is much more permissive than the actual grammar. Yes, :not(::pseudo-element) is an invalid selector. ~TJ |
|
|
Re: [css3-selectors] minor question about :not()Andrey Mikhalev wrote:
> > in 6.6.7: > "The negation pseudo-class, :not(X), is a functional notation taking a > simple selector (excluding the negation pseudo-class itself and > pseudo-elements) as an argument." > > so, :not(:pseudo-element) - allowed by formal grammar - > is invalid selector or "useless" selector, as foo:not(bar) ? > > Excerpt from section 6.6.7: The negation pseudo-class, :not(X), is a functional notation taking a simple selector (excluding the negation pseudo-class itself and pseudo-elements) as an argument. </Daniel> -- W3C CSS WG, Co-chair |
|
|
Re: [css3-selectors] minor question about :not()Daniel Glazman <daniel.glazman@...> wrote:
> Andrey Mikhalev wrote: > > > > in 6.6.7: > > "The negation pseudo-class, :not(X), is a functional notation > > taking a simple selector (excluding the negation pseudo-class > > itself and pseudo-elements) as an argument." > > > > so, :not(:pseudo-element) - allowed by formal grammar - > > is invalid selector or "useless" selector, as foo:not(bar) ? > > Excerpt from section 6.6.7: > > The negation pseudo-class, :not(X), is a functional notation > taking a simple selector (excluding the negation pseudo-class itself > and pseudo-elements) as an argument. Andrey quoted exactly the same text in his original message. I assume you mean to imply that the answer to his question *should be* obvious from that text, but since he quoted it before asking the question, it is not obvious to him, so your answer is not helpful. zw |
|
|
Re: [css3-selectors] minor question about :not()At 8:40 PM +0300 3/12/09, Andrey Mikhalev wrote:
>in 6.6.7: >"The negation pseudo-class, :not(X), is a functional notation taking >a simple selector (excluding the negation pseudo-class itself and >pseudo-elements) as an argument." > >so, :not(:pseudo-element) - allowed by formal grammar - >is invalid selector or "useless" selector, as foo:not(bar) ? Yes. The limited scope of ':not()' has long bugged me. It would be really useful to be able to say something along the lines of ':not(input, textarea, select, option) {margin: 0; padding: 0;}' -- thus allowing us to style all elements that are not form controls. Yes, this most often comes up in resets, which some people don't like, but there are other use cases besides just resets. I sort of get excluding pseudo-elements, but being limited to a simple selector is annoying and I don't quite see the point. -- Eric A. Meyer (eric@...) http://meyerweb.com/ |
|
|
Re: [css3-selectors] minor question about :not()On Thu, 12 Mar 2009, Zack Weinberg wrote:
> Daniel Glazman <daniel.glazman@...> wrote: >> >> Excerpt from section 6.6.7: >> >> The negation pseudo-class, :not(X), is a functional notation >> taking a simple selector (excluding the negation pseudo-class itself >> and pseudo-elements) as an argument. > > Andrey quoted exactly the same text in his original message. I assume > you mean to imply that the answer to his question *should be* obvious > from that text, but since he quoted it before asking the question, it > is not obvious to him, so your answer is not helpful. forgive me if my quote was unclean. i mean other parts of spec explicity claims invalidity, e.g. in lang(): "C must not be empty. (If it is, the selector is invalid.)" "A is B excluding C" says nothing about behaviour when A is C. > > zw > > > |
|
|
Re: [css3-selectors] minor question about :not()Zack Weinberg wrote:
> Andrey quoted exactly the same text in his original message. I assume > you mean to imply that the answer to his question *should be* obvious Exactly. > from that text, but since he quoted it before asking the question, it > is not obvious to him, so your answer is not helpful. So let me explain : according to section 4, a pseudo-element is not a simple selector. It's then impossible to negate a pseudo-element. </Daniel> |
|
|
Re: [css3-selectors] minor question about :not()Daniel Glazman <daniel.glazman@...> wrote:
> > So let me explain : according to section 4, a pseudo-element is not a > simple selector. It's then impossible to negate a pseudo-element. Aha, but then there's still a wording problem: in a simple selector (excluding X and Y) the parenthetical reads like it *modifies* "a simple selector"; i.e. it gives the impression that X and Y *are* simple selectors but are not permitted in this context. I suggest just deleting the parenthetical or replacing it with a cross-reference to the actual definition. zw |
|
|
Re: [css3-selectors] minor question about :not()On Thu, 12 Mar 2009, Daniel Glazman wrote:
> > So let me explain : according to section 4, a pseudo-element is not a > simple selector. It's then impossible to negate a pseudo-element. well, then section 4 is wrong, since not allow alone pseudo-element as selector. > > </Daniel> > > > |
|
|
Re: [css3-selectors] minor question about :not()On Mar 12, 2009, at 2:25 PM, Eric A. Meyer wrote:
> At 8:40 PM +0300 3/12/09, Andrey Mikhalev wrote: >> in 6.6.7: >> "The negation pseudo-class, :not(X), is a functional notation >> taking a simple selector (excluding the negation pseudo-class >> itself and pseudo-elements) as an argument." >> >> so, :not(:pseudo-element) - allowed by formal grammar - >> is invalid selector or "useless" selector, as foo:not(bar) ? > > Yes. The limited scope of ':not()' has long bugged me. It would > be really useful to be able to say something along the lines of > ':not(input, textarea, select, option) {margin: 0; padding: 0;}' -- > thus allowing us to style all elements that are not form controls. > Yes, this most often comes up in resets, which some people don't > like, but there are other use cases besides just resets. > I sort of get excluding pseudo-elements, but being limited to a > simple selector is annoying and I don't quite see the point. > > -- > Eric A. Meyer (eric@...) http://meyerweb.com/ > I've never seen the point either. WebKit actually allowed much more complex selectors inside :not and we've had to "dumb it down" in our latest nightlies to pass CSS tests and match other browsers. dave (hyatt@...) |
|
|
RE: [css3-selectors] minor question about :not()> On Thu, 12 Mar 2009, Daniel Glazman wrote: > > > > > So let me explain : according to section 4, a pseudo-element is not a > > simple selector. It's then impossible to negate a pseudo-element. > > well, then section 4 is wrong, since not allow alone pseudo-element > as selector. Would you mind quoting all the relevant statements demonstrating the contradiction ? |
|
|
Re: [css3-selectors] minor question about :not()Sylvain Galineau <sylvaing@...> wrote:
> Andrey Mikhalev wrote: > > well, then section 4 is wrong, since not allow alone pseudo-element > > as selector. > > Would you mind quoting all the relevant statements demonstrating the > contradiction ? I see what Andrey is getting at. # A _sequence_of_simple_selectors_ is a chain of _simple_selectors_ # that are not separated by a _combinator_. It always begins with a # _type_selector_ or a _universal_selector_. No other type selector # or universal selector is allowed in the sequence. # # A _simple_selector_ is either a _type_selector_, _universal_selector_, # _attribute_selector_, _class_selector_, _ID_selector_, or # _pseudo-class._ One _pseudo-element_ may be appended to the last # sequence of simple selectors in a selector. Thus for instance "*::first-letter" may not be shortened to "::first-letter", because the "::first-letter" is not part of the sequence of simple selectors, so the only simple selector in the sequence is "*" and the universal selector may not be omitted when it is the only simple selector (6.2). I don't see an internal contradiction in section 4, or a disagreement with the equivalent section of CSS2.1 (section 5.2). I have not close-read all of selectors3 so I don't know if this contradicts material elsewhere. There IS a conflict with implementations. Both Gecko and Opera accept "::first-letter" by itself as a valid selector. zw |
|
|
RE: [css3-selectors] minor question about :not()> I see what Andrey is getting at. <snip> > There IS a conflict with implementations. Both Gecko and Opera accept > "::first-letter" by itself as a valid selector. > Thanks for clarifying! But stating that pseudo-elements are simple selectors, or that they can be used alone, is unlikely to be the intention of the 6.6.7 exclusion imo. It may simply be to explicitly note that one cannot use pseudo-elements in :not() at all i.e. the argument is strictly a simple selector (minus :not()), not a selector. It may be possible to improve the wording by shortening the exclusion clause and adding a note e.g. from : #The negation pseudo-class, :not(X), is a functional notation taking a simple selector (excluding the negation pseudo- #class itself and pseudo-elements) as an argument. It represents an element that is not represented by the argument. To: #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 the argument. #Note: Appending a pseudo-element to a simple selector results in a selector; selectors are not valid negation pseudo #class arguments. |
|
|
Re: [css3-selectors] minor question about :not()On Tuesday 2009-03-17 16:48 -0700, Zack Weinberg wrote:
> There IS a conflict with implementations. Both Gecko and Opera accept > "::first-letter" by itself as a valid selector. I think this conflict (which is a bug in the spec in both selectors level 3 and in CSS 2.1, since it is an unintentional break in compatibility with CSS level 1) could be fixed without changing any terminology by changing: # If the universal selector is not the only component of a # sequence of simple selectors, the * may be omitted. in http://dev.w3.org/csswg/selectors3/#universal-selector to something like: # If the universal selector is not the only component of a # sequence of simple selectors or is followed by a pseudo-element, # the * may be omitted. although I don't think that wording "followed by a pseudo-element" is quite precise enough. We'd need an analogous change to http://www.w3.org/TR/CSS21/selector.html#universal-selector to fix CSS 2.1. -David -- L. David Baron http://dbaron.org/ Mozilla Corporation http://www.mozilla.com/ |
|
|
Re: [css3-selectors] minor question about :not()Eric A. Meyer wrote:
> At 8:40 PM +0300 3/12/09, Andrey Mikhalev wrote: >> in 6.6.7: >> "The negation pseudo-class, :not(X), is a functional notation taking a >> simple selector (excluding the negation pseudo-class itself and >> pseudo-elements) as an argument." >> >> so, :not(:pseudo-element) - allowed by formal grammar - >> is invalid selector or "useless" selector, as foo:not(bar) ? > > Yes. The limited scope of ':not()' has long bugged me. It would be > really useful to be able to say something along the lines of > ':not(input, textarea, select, option) {margin: 0; padding: 0;}' -- thus > allowing us to style all elements that are not form controls. Yes, this > most often comes up in resets, which some people don't like, but there > are other use cases besides just resets. > I sort of get excluding pseudo-elements, but being limited to a > simple selector is annoying and I don't quite see the point. I expect us to release that limitation in Selectors Level 4, along with introducing a corresponding :matches() pseudo-class (same as :not(), except it doesn't negate). ~fantasai |
|
|
Re: [css3-selectors] minor question about :not()Andrey Mikhalev wrote:
> > in 6.6.7: > "The negation pseudo-class, :not(X), is a functional notation > taking a simple selector (excluding the negation pseudo-class > itself and pseudo-elements) as an argument." > > so, :not(:pseudo-element) - allowed by formal grammar - > is invalid selector or "useless" selector, as foo:not(bar) ? Zack Weinberg wrote: > Daniel Glazman <daniel.glazman@...> wrote: >> So let me explain : according to section 4, a pseudo-element is not a >> simple selector. It's then impossible to negate a pseudo-element. > > Aha, but then there's still a wording problem: in > > a simple selector (excluding X and Y) > > the parenthetical reads like it *modifies* "a simple selector"; i.e. it > gives the impression that X and Y *are* simple selectors but are not > permitted in this context. I suggest just deleting the parenthetical > or replacing it with a cross-reference to the actual definition. I believe that these comments have been addressed by the latest Editor's Draft <http://dev.w3.org/csswg/selectors3/#negation>: # 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 the argument. # # Note: Since pseudo-elements are not simple selectors, they # are not a valid argument to :not(). Please let me know if this addresses your comment. ~fantasai |
|
|
Re: [css3-selectors] minor question about :not()L. David Baron wrote:
> On Tuesday 2009-03-17 16:48 -0700, Zack Weinberg wrote: >> There IS a conflict with implementations. Both Gecko and Opera accept >> "::first-letter" by itself as a valid selector. > > I think this conflict (which is a bug in the spec in both selectors > level 3 and in CSS 2.1, since it is an unintentional break in > compatibility with CSS level 1) could be fixed without changing any > terminology by changing: > # If the universal selector is not the only component of a > # sequence of simple selectors, the * may be omitted. > in http://dev.w3.org/csswg/selectors3/#universal-selector to > something like: > # If the universal selector is not the only component of a > # sequence of simple selectors or is followed by a pseudo-element, > # the * may be omitted. > although I don't think that wording "followed by a pseudo-element" > is quite precise enough. We'd need an analogous change to > http://www.w3.org/TR/CSS21/selector.html#universal-selector to fix > CSS 2.1. I've inserted "or is immediately followed by a pseudo-element". Please let me know if this is sufficient. ~fantasai |
|
|
Re: [css3-selectors] minor question about :not()fantasai <fantasai.lists@...> wrote:
> # 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 the argument. > # > # Note: Since pseudo-elements are not simple selectors, they > # are not a valid argument to :not(). I think the (excluding ...) parenthetical is still confusing, and would suggest instead # The negation pseudo-class, :not(X), takes a single simple selector # as an argument. It matches any element that its argument would not # match. # # Negations may not be nested; :not(...:not(...)...) is invalid. # Also, since pseudo-elements are not simple selectors, they may not # be used inside :not() either. zw |
|
|
Re: [css3-selectors] minor question about :not()On Mon, 19 Oct 2009, fantasai wrote:
> # 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 the argument. > # > # Note: Since pseudo-elements are not simple selectors, they > # are not a valid argument to :not(). > > Please let me know if this addresses your comment. OK > > ~fantasai > > > |
|
|
Re: [css3-selectors] minor question about :not()Zack Weinberg wrote:
> fantasai <fantasai.lists@...> wrote: > >> # 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 the argument. >> # >> # Note: Since pseudo-elements are not simple selectors, they >> # are not a valid argument to :not(). > > I think the (excluding ...) parenthetical is still confusing, and would > suggest instead > > # The negation pseudo-class, :not(X), takes a single simple selector > # as an argument. It matches any element that its argument would not > # match. > # > # Negations may not be nested; :not(...:not(...)...) is invalid. > # Also, since pseudo-elements are not simple selectors, they may not > # be used inside :not() either. I have made the following changes: http://dev.w3.org/cvsweb/csswg/selectors3/Overview.html.diff?r1=1.65&r2=1.66&f=h Please let me know if this is an acceptable response to your comment. ~fantasai |
| < Prev | 1 - 2 | Next > |
| Free embeddable forum powered by Nabble | Forum Help |