Hacker News new | ask | show | jobs
by rpwverheij 5171 days ago
take a look at LESS CSS. It does exactly this and more. http://lesscss.org/
1 comments

I don't think it does. What OP is proposing would require to modify the CSS engine to update the style of elements when something changes (hide some element when some other suddenly (via JS for instance) becomes visible). LESS/SASS does not give you that. Yes you have "if" clauses, but they are evaluated based on some fixed state when "compiling" to CSS.