Featherweb Blog

Blog index

This blog has gone classless

I have now created a first classless css. I've called it blogless.css, my usual blogstyle.css changed into a classless stylesheet. It is heavily based on Basic.css.
I wrote about classless stylesheets in this post

I've made blogless.css capable of cooperating with the small color stylesheets. It isn't always easy to write classless. Some classes are just for showing off your capabilities, but others are almost indispensable. For example, the little page-up triangle in the lower right corner wouldn't stay there if the toTop class wouldn't remind it to do so.

Like in all religions and politics, there are purists and unpurists, radicals and pragmatists. I've seen strict classless stylesheets, they are pure and boring. Then there's a group of inventors, who go to great length to construct a page of code to replace one simple class. Often very cleverly, but... In many classless css's the fact is accepted that it is hard to write html without using some classes.

That's what I did too: at the end of the stylesheet I appended this:

/* Additional classes...cheating wisely..*/ \n .left{float:left;} .right {float:right;} .center{display:block;margin:auto} .w150{width:15rem} .border{border:1px solid;padding:.5rem;border-radius:.8rem} .toTop{position:fixed;right:1rem;bottom:1rem;margin-right:1rem;font-size:200%}

I promise only to use them when needed.
May the gods of classlessness forgive me.