1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

HTMLとCSSの関心の分離設計(下書き)

Last updated at Posted at 2020-05-26

課題意識

HTMLとCSSは分離すべきだという一般論があるが、レイアウトの構造を整えるためのHTML要素やアニメーションで表現を変えるためのHTML要素も存在する。

HTMLとCSSは本当に分離できるのか、分離できるとしたら何が分離できて、分離できないとしたら何が分離できないかを整理する必要がある。

また、レイアウトは他のプログラミング機能と違い、単独のモジュールとしてでなく全体で初めて意味を持つ。

そのようなレイアウトの性質を踏まえ、どのようにレイアウトを設計すべきなのか。

レイアウトの共通化の単位はCSS単位ですべきなのかコンポーネント単位ですべきなのか。
コンポーネント単位だとしたら、それはHTMLとCSSが結合した状態に他ならず、分離を考えるよりもむしろ結合を前提にコンポーネント単位で関心を分離する方が適切なのではないか。

そういった事に関する考察。

Memo

  1. What is content and what is layout.
  2. What is separation of concerns.
  3. Why does separation of concerns matter.
  4. Not separation but direction of dependency.
  5. Difference of component and css.
  6. What is Utility class

参考

1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?