LoginSignup
210
184

More than 1 year has passed since last update.

CSSプロパティ記述順序

Last updated at Posted at 2015-05-15

2021/5/26 追記
筆者は昔手動でこの順に揃えてたけど今はstylelintのstylelint-orderを利用してソートしていたりするので、あくまで参考にしていただけると

2020/10/15 追記
https://github.com/devmgn/css-property-order
こちらへ


abc順やcss combなどプロパティの記述順序は様々だとおもいますが、自分はこれでやってます。

http://www.mozilla.org/css/base/content.css

content.css
/* Suggested order:
 * display
 * list-style
 * position
 * float
 * clear
 * width
 * height
 * margin
 * padding
 * border
 * background
 * color
 * font
 * text-decoration
 * text-align
 * vertical-align
 * white-space
 * other text
 * content
 *
 */

1. 「視覚整形モデル」に関するプロパティ

2. 「ボックスモデル」に関するプロパティ

3. 「背景」に関するプロパティ

4. 「フォントとテキスト、色」に関するプロパティ

5. 「表」に関するプロパティ

6. 「生成内容・ユーザーインターフェース」に関するプロパティ

7. 「アニメーション」に関するプロパティ

8. その他の関するプロパティ

210
184
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
210
184