Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from basara669/160905_modify
誤植についての対応
- Loading branch information
Showing
4 changed files
with
53 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,33 @@ | ||
# コーディング規約 | ||
|
||
## 1. HTML | ||
- インデントは半角スペース4個とする。 → (p.33 参照) | ||
- 入れ子になったHTMLは必ず1段階だけインデント(半角スペース4個)する。 → (p.33参照) | ||
- シングルクォートは使わず、ダブルクォートを使う。 → (p.33参照) | ||
- HTML5を使用する。 → (p.33参照) | ||
- lang要素を設定する。 → (p.33参照) | ||
- 「IE互換モード」の設定をする。 → (p.34参照) | ||
- 文字コードはUTF-8で設定する。 → (p.34参照) | ||
- JavaScriptの読み込みはbodyタグの閉じタグの前に行う。 → (p.129参照) | ||
|
||
●コーディング規約 | ||
## 2. CSS(Sass) | ||
|
||
▲1. HTML | ||
- インデントは半角スペース4個とする。 → (pxxx参照) | ||
- ネストされた要素は必ず1段階だけインデント(半角スペース4個)する。 → (pxxx参照) | ||
- シングルクォートは使わず、ダブルクォートを使う。 → (pxxx参照) | ||
- HTML5を使用する。 → (pxxx参照) | ||
- lang要素を設定する。 → (pxxx参照) | ||
- 「IE互換モード」の設定をする。 → (pxxx参照) | ||
- 文字コードはUTF-8で設定する。 → (pxxx参照) | ||
- JavaScriptの読み込みはbodyタグの閉じタグの前に行う。 → (pxxx参照) | ||
### 基本事項 | ||
- インデントは半角スペース4個とする。 → (p.39参照) | ||
- 可読性のために、開き波括弧の前に1つの半角スペースを入れる。 → (p.39参照) | ||
- 閉じ波括弧は新しい行に記述する。 → (p.39参照) | ||
- 「:」のあとに1つの半角スペースを入れる。 → (p.39参照) | ||
- idは使用せずclassを使用すること(p.45参照) | ||
- インラインCSSは使わない。 → (p.46参照) | ||
- 文字コードはUTF-8で設定する。 → (p.54参照) | ||
- 色の指定はHEX型を使用し、すべて小文字にする。 → (p.84参照) | ||
- 可能な場合は省略形のHEX型の値を使う。 → (p.84参照) | ||
- Sassのネストは3階層まで。(p.54参照) | ||
|
||
▲2. CSS(Sass) | ||
|
||
○基本事項 | ||
- インデントは半角スペース4個とする。 → (pxxx参照) | ||
- 可読性のために、開き波括弧の前に1つの半角スペースを入れる。 → (pxxx参照) | ||
- 閉じ波括弧は新しい行に記述する。 → (pxxx参照) | ||
- 「:」のあとに1つの半角スペースを入れる。 → (pxxx参照) | ||
- 文字コードはUTF-8で設定する。 → (pxxx参照) | ||
- 色の指定はhex型を使用し、すべて小文字にする。 → (pxxx参照) | ||
- 可能な場合は省略形のhex型の値を使う。 → (pxxx参照) | ||
- 0の値には単位を指定しない。 | ||
- インラインCSSは使用しない。 → (pxxx参照) | ||
|
||
○セレクタの書き方 | ||
- Blockの最初の文字は大文字で書く。 → (pxxx参照) | ||
- Elementの最初の文字は小文字で書く。 → (pxxx参照) | ||
- BlockとElementは「__」でつなぐ。 → (pxxx参照) | ||
- ネストは3階層までにする。 → (pxxx参照) | ||
- Modifierをつける場合は「--」でつなぐ。 → (pxxx参照) | ||
- JavaScriptで状態を変更する場合は「isXX」という命名にする。 → (pxxx参照) | ||
- レイアウトに関するものは「l-」の接頭辞をつける。 → (pxxx参照) | ||
- ユーティリティについては「u-」の接頭辞をつける。 → (pxxx参照) | ||
|
||
★★規約ここまで↑ | ||
### セレクタの書き方 | ||
- Blockの最初の文字は大文字で書く。 → (p.75参照) | ||
- Elementの最初の文字は小文字で書く。 → (p.76参照) | ||
- BlockとElementは「__」でつなぐ。 → (p.76参照) | ||
- Modifierをつける場合は「--」でつなぐ。 → (p.76参照) | ||
- レイアウトに関するものは「l-」の接頭辞をつける。 → (p.121参照) | ||
- JavaScriptで状態を変更する場合は「isXX」という命名にする。 → (p.141参照) |
Empty file.
File renamed without changes.