4 ms·
I'm really afraid of CSS having too much logic and driving designers away. I don't want to go back to the days when designers mocked up in Photoshop and had dev
by MatthewPhillips 15y ago
I'm really afraid of CSS having too much logic and driving designers away. I don't want to go back to the days when designers mocked up in Photoshop and had devs (inferior designers) do the CSS.
- micheljansen 15y agoI'm a designer and I just finished moving our product form CSS to Less.js (server-side preprocessed). This allowed me to define variables such as @baseColor, @buttonColor etc. so that the developers working on the project can use those instead of copy/pasting colours from other places and making a huge mess. Variables are not logic. Once CSS seizes being declarative and starts becoming a programming language, I think we might start seeing problems, but the author is not suggesting adding an if-statement to CSS (one might argue that media queries are already conditional enough).
- rglover 15y agoYou make a good point, but real designers know how to code (at the very least HTML/CSS). I'd consider any veteran designer who tells you they're "frightened by code" to not be worth it. Perhaps new concepts like variables will just be natural selection for the front-end. I'm a designer, by the way.
- richthegeek 15y agoThis tends to insult the design community, but hopefully you'll fine the humor in it: The proper name for a web designer who can't write HTML+CSS is "artist".
- tripzilch 15y agoThe mythical designer that 1) is able to write valid cross-browser CSS ready for deployment without developer tweaking 2) would not understand basic logical constructs such as CSS Constants. does not, in fact, exist. At least, I have never met one. Think of it like this, imagine there is a sort of spectrum for capability of abstract logical/mathematical related thought. Roughly, on one extreme end there's someone who is so intuitive practical you wouldn't trust to properly split a dinner bill (this is not a "designer stereotype" btw, but an example of the very extreme end of the scale), in between there's doing calculations, solving simple equations, writing CSS, writing CSS-with-constants, using a templating language, doing actual coding, hardcore coding genius, and at the far end there's Neo who can stop bullets with his mind by wearing the right kind of shades and longcoat. Your fear of "having too much logic and driving designers away" is only valid if the majority of web-designers fall right between "capable of writing CSS" and "capable of writing CSS with constants". Sorry but that's a rather narrow range and I'm not buying it. And the few designers that happen to fall exactly in that range will either have to write CSS without constants (which is fine), or learn to deal with it.
- MatthewPhillips 15y agoI'm not saying that this is the spec that pushes CSS into the code-territory. I'm not saying there is any one spec that does. I'm looking at the aggregate of CSS4 and am afraid that we are heading in that direction. See, for example, the crazy (and awesome, btw) things you can do in upcoming selectors such as matches[1] combined with a for[2], or the mind-bender that is the shadow dom[3]. [1] http://dev.w3.org/csswg/selectors4/#matches http://dev.w3.org/csswg/selectors4/#matches [2] http://dev.w3.org/csswg/selectors4/#idref-combinators http://dev.w3.org/csswg/selectors4/#idref-combinators [3] https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shado...
- debacle 15y agoI think the more important reality is that TIMTOWTDI doesn't really belong in CSS, and that's what we're seeing happen more and more. Part of the problem is that CSS And rich internet applications can't really properly coexist - they do now, because that's part of how we work, but as time goes on the amount of lifting we're going to want to do with JavaScript is only going to continue to increase.
- nitrogen 15y agoDoes W3C publish a rationale for each spec? I searched the Shadow DOM spec for the word "rationale" and found nothing, the abstract didn't say why the spec is useful, and the TOC didn't seem to list a justification section. Reading the Introduction section, I get the impression that Shadow DOM is supposed to help with creating widget-based UIs, but if we're at that point, why are we still using the text/document-focused DOM instead of creating a new abstraction that is better suited for UI (though the insertion point concept looks potentially useful)?
- jerf 15y agoI agree with you in principle about the abstraction issues in CSS, however I would submit that CSS constant's contribution to the problem is negative. It simplifies real-world CSS to have constants, and this has frankly been obvious for about 15 years now. As for the rest of CSS, I've really been rolling around to "just create a canonical JS binding and be done with it"; it's headed headlong into the Turing Tarpit and as long as it's going to end up there one might as well use a language designed to live in it.
- aqme28 15y agoI'd be more as worried that unintuitive design would scare potential designers away. Seeing something like #046e08 everywhere scared me much more as a new developer than something as simple as "let green1 = #046e08" would have.
- masklinn 15y agoThere's no logic to defining constants. Which is what the "CSS Variables" proposals are about. It merely makes maintenance much, much easier.
- kamjam 15y agoIf something as simple as a variable scares you then I am guessing you have no hope in hell with dealing with a bit of jQuery, let alone Javascript. Welcome to the real world. It's time to upskill. Side note: Developers may be inferior designers, but that does not make them inferior coders, since by their nature, that is what they do day in, day out. I am not a designer, I am not a front end guy, but my html/css/javascript is a lot better quality and reusable than I have seen come out of any design agency. We won't even go into having any consideration of the selectors they use and any rendering speed they may have...
- akdetrick 15y agoI'm afraid of the same thing, but not because it will drive away designers, but because CSS is meant to be, and is most powerful as a declarative language. What CSS really needs is an actual layout module in the specification (instead of the hacks we still use to this day to execute the most simple of layouts). With all that said, I do think variables are a great idea.