I've always thought of formatting, whether through style sheets or not, as the last thing that needs to be done to finish off a project, but not part of the programming. Can you "program" in CSS, and if so, how would you and why would you want to?
Or is all this talk of CSS programming the result of ignorant HR people putting it on job descriptions?
This post has been edited by skyhawk133: 05 February 2009 - 08:34 AM
As far as a programming language, CSS is definitely its own language. If you know HTML like the back of your hand, but have never even looked at CSS, you can't just jump in and know everything right off.
Everything. All CSS. The only HTML you will find on that page are the DIV tags and Tables containing the actual data. Everything else is all CSS.
Everything apart from the deprecated <font> and <center> tags, and tables used for non-tabular data you mean?
I do agree with what you're saying though. CSS may not be overly complicated and may read more like a set of rules than a program, but it has it's own language, and does take some time to learn properly. Admittedly, that's more the fault of the varying degrees of browser support, but with CSS3 it is becoming more powerful and includes basic techniques for reading the DOM.
I think that you should look at CSS as a lawnmower engine - you fix it and then a professional diesel engine worker comes up to you and says, that isn't an engine at all. When in actuality it is, albeit simpler, it still does make something move. Personally I would say that it is a "scripting" language, and I personally love its intuitive nature. I don't know where in the rule book of creating languages "crazy syntax" is listed, but it should be deleted.
I'm gonna go out on a limb and say that CSS is a language. It's a highly specialized declarative language, certainly not Turing complete. But a language all the same.
So yes you can 'program' in CSS.
And as far as 'programming' and 'scripting' goes, there's nothing that says you can't compile an 'interpreted' language or interpret a 'compiled' language. Certainly you don't usually see a C++ interpreter or a Scheme compiler, but that doesn't have to be the case.
I think this is a tough topic to answer one way or the other. I think its really down to whoever is using it.
(Of course that only applies if you follow W3C XHTML strict standards, which if you don't you really should).
In saying that, both HTML and CSS contain non-standard english syntax so why shouldn't they be considered languages, particuarly when the L in HTML stands for language
How about SQL? Or XSLT? Or even some of the purer forms of Lisp?
These are all declarative languages. They aren't procedural and do not execute in that sense, but they are certainly an instruction set designed for a particular processor.
I don't say I "program" in SQL or HTML, but that I write it. I reserve the term programing for when I make something happen as opposed to describe what should happen. However, this is more a bias on my part than anything else. If someone says they're programming CSS, I'm willing to concede the usage.