このページは2007年 10月 30日, 21:50に更新されました by RoyK

CSS Coding Style

From $1

目次
ヘッダーがありません
  • Always be as explicit as possible ("div.foobar" if possible; if you need to cascade across div and span, then .foobar)
  • Avoid CSS2 selectors; if used, be sure that there's an IE6 fallback
  • Keep the opening bracket on the same line (this makes for easier searching)
  • Indent the styles
  • Use short-hand notation when possible (e.g. "border: 1px solid #000;")
  • Space after colon for legibility
  • Font-family declarations should always fall back to serif; or sans-serif;
  • Keep IE-specific hacks into a separate CSS file
  • Do not use negative margins/paddings or position: absolute unless necessary - these are usually short-cuts to the correct CSS implementation
  • All MT designs should use YUI's reset.css
タグ:
 
コメント(0)
あなたはコメントを投稿するには ログイン しなければなりません。