background preloader

Internet

Facebook Twitter

Latitude

Drupal. Site. Write a well structured CSS file without becoming crazy. Big CSS files can be complex to manage but a good structured code can help you to make your life simpler.

Write a well structured CSS file without becoming crazy

This is a descriptive post about how to write a well structured CSS file. I already spoken about code readability in CSS files, but after several most specific requests about this argument (mainly about the difficult of some readers to manage CSS file with a big quantity of layout elements), I decided to illustrate the process I use in these cases. I experienced, proceeding without "order" or a clear vision about what you want to realize can be harmful and you risk to add, change, remove classes and properties, with the only result to have untidy code with a lot of unused elements on your final product. Before you start writing directly CSS code, I suggest you to prepare a "draft" with all sections your site will have.

Youtube

Firefox. Local. Drupal.