Skip to main content

Home/ CSS Evangelist/ Group items tagged mag

Rss Feed Group items tagged

helloe

PingMag - The Tokyo-based magazine about "Design and Making Things" » Archive... - 7 views

  • Writing CSS is very much like having sex. Not everyone does it the same way and there is no particular “right” way to do it. I guess for me the similarities actually end there, seeing as writing CSS is something I do every day whereas having sex is…anyway I digress. The W3C have set the standards but beyond this, writing CSS is down to an individual’s preferences. Here are 5 little tips and ideas I’ve adopted in the last 6 months that you can use to make your CSS more streamlined, maintainable and easy to read. Written by Jon Disclaimer: The CSS example files are exactly that. They are not meant to be fully functional CSS documents. Class names in the CSS files are named merely so that you may visualise the document in your head (because there is no accompanying html), not because I condone the naming convention in them.
  • 1) Make a table of contents At the top of your CSS document, write out a table of contents. For example, you could outline the different areas that your CSS document is styling (header, main, footer etc). Then, use a large, obvious section break to separate the areas. Not only does this make your CSS look neater, but when it comes to making quick adjustments to certain areas of your website at a later date, finding the corresponding area in your CSS will be much easier. View Example File 1
  • 3) Isolate single properties that you are likely to reuse a lot If you find yourself using a single property a lot, isolate it to save yourself repeating it over and over again and also enabling you to change the display of all parts of the site that use it. View Example File 3
1 - 1 of 1
Showing 20 items per page