September 9, 201115 yr If one of you mods would rather this was in a different forum feel free to move it. Anyway. I've started seeing, floating around, a raging debate about CSS. The debate is about whether CSS should be changed with new features added to it. These features could include things like "if, else" statements and even variables. Apparently, these features are being asked for very widely by developers. Many of these extensions would bring CSS closer to a programming language. The question is, do you think CSS should be changed and added to? Personally, I am strongly against this. The day, if it came, CSS turned into a complex programming language would be for me a very sad day. Whilst it could be done in a way that's still comparatively simple compared to say, PHP or Ruby, I believe extensions such as variables and if statements belong elsewhere - in the backend code we use to power our sites. I don't believe CSS should be added to because it would make it much harder to learn, much harder to make mistakes and much longer to code. The beauty of CSS for me is that it's so damn quick for me to type out a stylesheet for a website. Further, it's already possible using a combination of Htaccess and PHP to add variables etc to CSS, there's no need to make it an integral part of the language. But, what do you think? Should CSS be expanded? Should it be made into a more powerful programming language?
September 9, 201115 yr Nope. CSS should only be for direct styling of elements. Any messing with elements should be handled by a programming language dedicated to this function. When I use CSS I want to go... "I want thus paragraph to be this coolour with this background and this size" Simple and easy. If I want that to change because of some action taking place, then another programming language can be used to manipulate either a rule, a class or a whole page. CSS is defined by the ability to separate style from structure /function. I don't ever see it being extended beyond that so I wouldn't worry about it.
September 9, 201115 yr The question is, do you think CSS should be changed and added to? err I'm going to have to be awkward and say yes and no. Yes, it will always need to be looked at and improved - hence why we are now on CSS3. As for some people suggesting the following:- "These features could include things like "if, else" statements and even variables." I don't think that would be a good idea personally. As for the thread title - Should CSS be complicated, no it shouldn't be, but I am finding my CSS files can often be bigger than my HTML or PHP files, and that's not because I am using unnecessary CSS. Edited September 9, 201115 yr by oakleaves
September 9, 201115 yr I've always thought that variables at the very least should be part of CSS. I've started using LESS which is great for such things, as well as mixins. Remember the whole point of variables and such is that it makes it overall quicker to code as there is repetition
September 9, 201115 yr Author The biggest problem for me would be implementation and compatibility. Even if you introduced variables, what do you do about the browsers that don't support them? It could get very messy. It's not like adding a border radius where it just doesn't show up.
September 9, 201115 yr God no it would turn out to be like actionscript in flash and that got stupidly complicated after V4
September 9, 201115 yr Author Can't stand SASS personally. Over complicates something that should be kept simple. I hope CSS never ends up like that.
September 9, 201115 yr Not all web developers are good coders, that's why this forum exists, for amateurs who just want to create their own simple website. So basic HTML and CSS should remain fairly simple and logical, "what you see is what you get", processing in the same order as typed, and so on, then scripts and other languages can be learnt for additional features. I get confused by Javascript and PHP where things need more arithmetical knowledge like boolean concepts and things are coded in places which affect code elsewhere (CSS styesheets do this, of course, but it's fairly straightforward).
September 9, 201115 yr Can't stand SASS personally. Over complicates something that should be kept simple. I hope CSS never ends up like that. Hmm opposite for me, i love being able to nest rules and define variables. However, CSS should be kept and simple.
September 14, 201115 yr I voted maybe. CSS shouldn't turn into a full-fledged programming language but if said extensions were used to automatically style tabled data or something similar, it could be useful and within the CSS scope.
Create an account or sign in to comment