CSS設計
#CSS #Atomic_Design #React_Atomic_Design #BEM記法
#CSSフレームワーク
命名規則関連
CSS Architecture: First steps
https://cheesecakelabs.com/blog/css-architecture-first-steps/
コードを小さなチャンクに分割し、スコープでそれらを分離
独立したカプセル化された方法でコンポーネントをコーディングする。
CSSセレクターの目的と相互関係に基づいて名前を付ける。
ITCSS
Settings
Settings is where your configuration files, such as variables (colors, sizing, typography definitions…) and helpers (functions, mixins…) will be stored.
Base
The Base layer will contain your reset and unclassed HTML rules – the way a default <a> or <input>
Layout.
Layout stores the structural classes that hold components on the page – grids and containers, for example. And lastly,
Components
Components: the core of CSS architectures and design systems.
【CSS設計手法】BEM、OOCSS、SMACSSの違いと特徴のまとめ | Web Design Trends
OOCSS
影響範囲が分かりづらい
SMACSS
スマックス
http://smacss.com/ja
カラーコード規約例
CSS変数の命名規則について考える
CSS設計にあたっての参考情報
GitHub - tfvictorino/modular-ui-directory: Directory of references on new perspectives and approaches for designing and developing user interfaces and design systems.
CSS設計において特に大切にしている思想をまとめてみた
冗長に書いても良い
意味のあるdivやspanは使う
div等がすくないとその構造の責任が大きくなる。
【脱!important】保守性を意識したスタイルを確実に上書きするためのテクニック
同じクラス名を連結してスタイルを上書き
極力idセレクタにスタイルを適用しない
idセレクタを
code:css
.large-text.large-text
.large-textclass
id="hoge" #idセレクタを属性セレクタに変換
デザイントークン
色などを仕様として定義?
色などを変数みたいに参照できるようにしておくということ?
参考
デザイントークンとは?デザインシステムに関わる人が知っておきたいメリットや使い方まで - bagelee(ベーグリー)