Skip to content

Commit

Permalink
Added comments section
Browse files Browse the repository at this point in the history
  • Loading branch information
otakustay committed Jun 15, 2012
1 parent 6ff96ce commit df7afe2
Showing 1 changed file with 47 additions and 1 deletion.
48 changes: 47 additions & 1 deletion translations/zh-CN/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,53 @@
<a name="comments"></a>
## 3. 注释

(占位)
良好的注释是非常重要的。请留出时间来描述组件以及它们的运作方式、局限性和构建它们的方法。不要让你的团队其它成员来猜测一段不通用或不明显的代码的目的。

注释的风格应当简洁,并在代码库中保持统一。

* 将注释放在主题上方并独占一行。
* 避免在行未放置注释。
* 控制每行长度在合理的范围内,比如80个字符。
* 使用注释从字面上将CSS代码分隔为独立的部分。
* 注释的大小写应当与普通句子相同,并且使用一致的文本缩进。

提示:通过配置编辑器,可以提供快捷键来输出一致认可的注释模式。

#### CSS示例:

```css
/* ==========================================================================
区块注释段
========================================================================== */

/* 子区块注释段
========================================================================== */

/*
* 分组注释段
* 用于多行的释义或文档。
*/

/* 基本注释 */
```

#### SCSS示例:

```scss
// ==========================================================================
// 区块注释段
// ==========================================================================

// 子区块注释段
// ==========================================================================

//
// 分组注释段
// 用于多行的释义或文档。
//

// 基本注释
```

<a name="format"></a>
## 4. 格式
Expand Down

0 comments on commit df7afe2

Please sign in to comment.