- From: Mark Brown <mark@mercurylang.org>
- Date: Thu, 8 Sep 2016 03:27:58 +1000
- To: "www-style@w3.org" <www-style@w3.org>
On Wed, Sep 7, 2016 at 3:22 AM, Brian Kardell <bkardell@gmail.com> wrote: > On Wed, Aug 31, 2016 at 10:30 PM, G. A. Light U1365222 > <U1365222@unimail.hud.ac.uk> wrote: >> >> Ø What if there is another rule: >> >> >> >> Ø li:nodisplay > a[href="bad link"] { display:inline; } >> >> >> >> That depends on the order that the CSS rules are applied and whether or >> not !important is used. >> These dependencies are not a problem, since they occur in the cascade rather than during filtering. Consider that element styling covers two stages: filtering, which determines a set of declarations applying to a property of an element, and cascading, which determines which of those declarations wins out. Obviously, the result of the cascade depends on that of filtering, since that is where the set of declarations comes from. The difficulty with the :nodisplay selector is that it affects filtering, and yet it depends on the result of the cascade. Given the above, that's a circular dependency. >> >> >> You get the same contradiction with existing CSS like: >> >> >> >> a { display:block; } >> >> a[href="bad link"] { display:none; } There's no circular dependency here: filtering is independent of the cascade, and if both declarations apply the cascade will choose display:none because the rule has higher specificity. > No, I think the point that Mark was trying to make is that your proposal > appears to create a cycle, whereas current CSS designs are specifically to > avoid cycles. Yes, exactly. > It's possible he (and I) misunderstand your proposal though, so > if that is based on a misunderstanding, please clarify. In particular, do you have a proposal for how to break the cycle? This feature would require new cascading rules, and I can't extrapolate from your example what those rules might be. Mark
Received on Wednesday, 7 September 2016 17:28:29 UTC