Summary 總結

  • Think in components, named with 2 words (.screenshot-image)
  • 元件 的角度思考,並以兩個字詞命名(.screenshot-image)
  • Components have elements, named with 1 word (.blog-post > .title)
  • 元件擁有 元素,並以一個字詞命名。
  • Name variants with a dash prefix (.shop-banner.-with-icon)
  • 命名 變形 時,開頭要用一個 dash (-)作為前綴。
  • Components can nest
  • 元件可以嵌入。
  • Remember you can extend to make things simple
  • 記得,你可以化繁為簡。