- From: Brice PARENT <brice@websailors.fr>
- Date: Fri, 27 Jan 2012 00:47:21 +0100
- To: www-style@w3.org
Even if we're talking about it, i was still taking the "!" for something it shouldn't be... So, what's does the "!" adds? Shouldn't we have the simple "form:matches(> input:focus) input[submit]{...}"? We have "form input[submit]" which declares css properties, but only if "form" (the element which has the :matches) also validates "form > input:focus". It just requires to put the :matches on a common node, which could be "body" for html, in the worst case. Do anyone have a use case where it is needed to have the "!" later in the parentheses? Le 26/01/2012 18:57, Brice PARENT a écrit : > In the draft for :matches, it is said that it may not be combined with :not. > So we may use "!" inside to do the same, i don't really understand why > it couldn't be done using :not (like described in > http://dev.w3.org/csswg/selectors4/#matches). > My point is, if one (! or :not) may be done, let's do it without any > addings like "!", no? > Anyway, I totally agree that "!" is understood as NOT, and i was also > confused with !important at the beginning. > > Le 26/01/2012 17:35, Brian Kardell a écrit : >> You gave: >> >> form:matches(! > input:focus) input[submit] { display: none; } >> >> What do you mean "if we can negate the content :matches with a "!"" ? >> >> I guess it is possible that I misunderstand but I think that question >> might have just effectively +1'ed my point. >> >> >> >> On Thu, Jan 26, 2012 at 11:03 AM, Brice PARENT <brice@websailors.fr> wrote: >>> Le 26/01/2012 16:33, Marat Tanalin | tanalin.com a écrit : >>>> 26.01.2012, 03:06, "fantasai" <fantasai.lists@inkedblade.net>: >>>>> On 01/25/2012 02:34 PM, Brian Kardell wrote: >>>>> >>>>>> ! Or $ ? >>>>>> >>>>>> :-) >>>>> Something. Or other. :) The problem with $ was that it's often >>>>> used for variables, so people didn't like that for that reason, >>>>> which is fair. I don't have a particular preference of ASCII >>>>> character. >>>>> >>>>> ~fantasai >>>> Currently we probably have too many syntaxes that have similar meaning: >>>> >>>> 1. ':scope' in Selectors 4 (dev.w3.org/csswg/selectors4/ ); >>>> 2. '!' in Selectors 4 (dev.w3.org/csswg/selectors4/ ); >>>> 3. '&' in CSS Hierarchies Module (dev.w3.org/csswg/css3-hierarchies/ ). >>>> >>>> Instead, we could use one ':this' pseudo-element. I've initially proposed this pseudo-element in a thread related to potential '@with' at-rule: >>>> >>>> http://lists.w3.org/Archives/Public/www-style/2012Jan/0371.html >>>> >>>> (':scope' may be considered as possible alternative for ':this', though use of ':scope' is questionable for me since it can be confusing when used in conjunction with HTML5 scoped stylesheets.) >>>> >>> Wouldn't this disallow the use of :this described in the linked page >>> about @rule? >>> In the examples with the @rule page, it seems like :this is to be >>> replaced by the content of @with, but the selector continues like it >>> always does, pointing to the last element. >>> Here, the :this would tell that even if the selector is continuing, this >>> is the element we want to be affected by the css rules. >>> >>> Anyway, as the topic is not this one, but "Focused descendant pseudo >>> class", i would say that >>> form:matches(! > input:focus) input[submit] { display: none; } >>> could be really usefull. Even if the "!" was changed to anything else... >>> >>> Quick question : if we can negate the content :matches with a "!", why >>> wouldn't that be possible to have :not(:matches()) or :matches(:not()) ? >>> >>>
Received on Thursday, 26 January 2012 23:47:52 UTC