Skip to content

Commit

Permalink
docs: code style guide docs improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
jooy2 committed Feb 19, 2024
1 parent ea35d7a commit dd6feeb
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 24 deletions.
41 changes: 19 additions & 22 deletions docs/language/css/code-style-guide.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,7 @@
# CSS3 Code Style Guide

κ°œμΈμ μ΄μ§€λ§Œ ν•©λ‹Ήν•œ, κ°„κ²°ν•˜λ©΄μ„œλ„ λͺ¨λ˜ν•œ μ½”λ“œ μž‘μ„± μŠ€νƒ€μΌ κ°€μ΄λ“œ

## CSS

### λ§ˆμ§€λ§‰ μ†μ„±μ—λŠ” μ„Έλ―Έμ½œλ‘ (`;`)을 뢙이지 μ•ŠλŠ”λ‹€.

**🚫 Bad**

```css
.myClass {
display: block;
background: red;
}
```

**βœ… Good**

```css
.myClass {
display: block;
background: red;
}
```

### 속성과 속성 사이, 속성과 κ°’ 사이에 곡백을 뢙인닀.

**🚫 Bad**
Expand Down Expand Up @@ -141,6 +119,25 @@
}
```

### 역할이 κ²ΉμΉ˜λŠ” 속성을 μ€‘λ³΅ν•˜μ—¬ μ‚¬μš©ν•˜μ§€ μ•ŠλŠ”λ‹€.

**🚫 Not Good**

```css
.myDiv {
padding: 0 0 0 5px;
padding-left: 10px;
}
```

**βœ… Good**

```css
.myDiv {
padding-left: 10px;
}
```

각 λ°©ν–₯ λ§ˆλ‹€ μ„œλ‘œ λ‹€λ₯Έ 값을 κ°€μ§€λŠ” 경우 `padding`μ΄λ‚˜ `margin` μ†μ„±μ˜ 경우 `TRBL`(Top, Right, Bottom, Left)의 μˆœμ„œλ‘œ μž‘μ„±ν•  수 μžˆλ‹€.

```css
Expand Down
2 changes: 0 additions & 2 deletions docs/language/html5/code-style-guide.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# HTML5 Code Style Guide

κ°œμΈμ μ΄μ§€λ§Œ ν•©λ‹Ήν•œ, κ°„κ²°ν•˜λ©΄μ„œλ„ λͺ¨λ˜ν•œ μ½”λ“œ μž‘μ„± μŠ€νƒ€μΌ κ°€μ΄λ“œ

## HTML

### νƒœκ·ΈλŠ” λͺ¨λ‘ μ†Œλ¬Έμžλ‘œ μž‘μ„±ν•œλ‹€.
Expand Down

0 comments on commit dd6feeb

Please sign in to comment.