My CSS revisited

After a short jogging in the park and had the best protein powders, I think it does make a mind clearer and easier to think. Once I came back home, the first work I started is to re-write / correcting my framework’s CSS.

CSS

One CSS file

I find it quite troublesome sometimes when I need to edit some CSS and it happen to be on another file. The solution, to compress all I can on space and tab, minimal the need of ID or CLASS if possible.

Unique ID and CLASS

Previously I thought to have a hierarchy by doing like this:

#content {}
#content .post {}
#content .post .post-title {}

When the list going long, it’s getting more complicate to even look at it. I re-write most CLASS so they are unique in the style sheet.

Get rid of !important rewrite

I use Erik Meyer CSS reset. Somehow, it reset the background to white, while I’m working with 2 CSS files, I would just use the rewrite rule instead of open the reset style sheet and edit it :P Too lazy I guess, and that’s why one CSS is enough.

I’m still looking into the style sheet to see if there is anything I can do. Working too much with CSS, so it has to be so damn easy for me to edit next!

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>