Cascading Style Sheets, or CSS for short, are like waterfalls except with style sheets rather than water. They cascade down pages and websites, which are like rocks except that they're on computers. They can make pretty rainbow colours if you get the angle just right, or they can drown you if you fall in. You could also hit yourself on a web page or get eaten by fish.
But what are style sheets? They're like water. Sort of. They're thingies composed of sets of rules which are kind of like molecules or algae or something. Water comes in sheets, except when it comes in drops, puddles or mist, but nobody cares about that because in waterfalls it's sheets or curtains, and maybe drops but whatever. There are also fish and things, kind of like how there are ids, classes and whatnot in CSS, and they eat the planty things and might bite you if you're not careful.
CSS has had multiple editions - 1, 2, 2.1, 3 and 4 - similarly to how waterfalls come in multiple editions. With each subsequent edition, more unicorns have been added. Unicorns from CSS 2 don't work in CSS 1, and so on. The point of updating CSS is to have fun and provide homes for loose unicorns that appear in people's heads.
Now recall the cascading part in the name. Now think of a series of CSS pages as waterfalls starting at a tall cliff and running one by one down to the valley below where your computer is. Since CSS pages are designed to get along with each other or at least try to, just like Sesame Street tried to teach you, a smooth flow of stuff is insured. All the fish are happy. Earlier, style sheets existed but did not try to get along with each other. Again think about two waterfalls, one above the other, with the top one flowing nicely down but the bottom one flowing sideways. That might work or might not, but it gets fishing bears really wet. A bunch of waterfalls, some flowing up and some flowing down might look neat but doesn’t get you much if any water down in the valley and confuses the fish.
Not all browsers support CSS because the style sheets are sometimes wet (with coffee, as water is never found inside computers) and the whole thing works by some kind of voodoo magic. However, long about IE 3.0, people realised that computers are just witchcraft anyway and it's either attach them to a log and stick them in the water or support CSS. The latter was more practical or something.
Nowadays browsers are kind of like those giant catfish waiting in the river for a tasty treat to come floating by. Once in a while, they’ll get a tree stump in the face or something like that coming off the CSS waterfall. Then Mother Nature or somebody like that has to send them to a corner somewhere for a time out. Browsers can also sort of get confused by real food coming down the waterfall. So the gnomes or fairies or whatever at the top of the waterfall have to change the waterfall around a little to make sure all the giant catfish get their daily bunch of vitamins and minerals.
Not only do some browsers not support CSS, but different browsers support different versions of it. The people in charge of designing it love standards, so they invent lots of them.
There are many things you might want to do with it but can't, but there are just as many things you can do with it that you probably shouldn't. One popular use of CSS is obnoxious colour schemes that at best are merely annoying and at worst impossible to read. It can also be used to put fairy spells on anyone who views the page. This is kind of like satanic backmasking messages except not really.
Rainbow colours are really shiny.
Invisible and maybe imaginary critters that are gnomes or fairies or something create the waterfalls that humans call CSS. Standing at the top edge of a waterfall, they knit together little blobs of water into the curtain shape we see. And of course, it looks all invisible to us because it's water and magic, duh.
These beings are kind of shy about their doings. They will sometimes leave little trails of magical symbols that look a lot like the letters and symbols that humans use. However, sometimes they use human symbols in sort of strange ways, like the hashtag thingie. They will use cat's ears symbols meant for pictures and turn them sideways, of all things. Yet some of these critters will get bitey from time to time, making fun of humans attempting this mysterious art by writing mean stuff like, "Shoulda used GoLive".
These gnomes or fairies or whatever have what the ancient gamers called "madskilz", which is thought to involve a now-forgotten dealie called "thinking". That "thinking" business was made illegal after the release of the iPhone, so don't even imagine trying to do it now. But that stuff allows them to move really tiny things called pixels around, whatever those are. That makes them pretty powerful but dangerous-like. Earthquakes were caused by the anger of one of these gnome or fairy guys spending a whole day making a CSS page on their Osborne 1 (whatever that is), only to find what they did was off by three pixels (whatever those are, again) on some browser or the other.
- like, a big one.
- Users with monochrome monitors will just have to take my word, okay?
|Parts of this article were originally sporked from Illogicopedia.|