News for hackers. Stuff that matters.
Re:CSS4 Preview – Selectors by yaix on Wednesday March 07, 2012 @03:39AM (#3674818)
Again, what I care about is not the syntax but the functionality. If you want write it as

body > div:if(body > ul > li:only-child) { background:green } body > div:not(body > ul > li:only-child) { background:green }

which may or may not already work in CSS3.

Re:CSS4 Preview – Selectors by masklinn on Wednesday March 07, 2012 @07:18AM (#3675190)
> Again, what I care about is not the syntax but the functionality.

Issue here is that you're talking about this using syntax for something which has absolutely no relation. Which is a tad confusing.

No, what you want does not work in CSS, you can't make a selector conditional on a second completely unrelated selector (you probably can in XPath, although I'm sure your colleagues will soon look to end your life if you do)

Re:CSS4 Preview – Selectors by yaix on Wednesday March 07, 2012 @09:52AM (#3675647)
Could you explain why? Let's say you have a clickable element and want to display a status text on hover. The status texts are loaded in some divs somewhere else on the page. You would need JS to catch onhover and then swap the display:hidden to block or whatever. Why would anybody look to "end my life" if that was possible?

div.status > span:on(div.clickme > a:hover) { display:block; }

Why would that be bad?

Re:CSS4 Preview – Selectors by masklinn on Thursday March 08, 2012 @04:51AM (#3679190)
> Why would that be bad?

It's "action at a distance", it's very, very hard to understand and debug what happens.

Re:CSS4 Preview – Selectors by yaix on Friday March 09, 2012 @10:35AM (#3684428)
(1) You mean like when you do the same thing with Javascript? Why its okay then? (2) If you alter a parent element with CSS that's "action on a distance" as well.

Your argument is not very convincing.