Daily UX
- Mobile first is not necessarily popular just because the mobile device arise. It is because we have to focus on the most important information/content when we design for a small screen.
- Think ahead about what device you will support and think about multiple of them at the same time.
JS
- async/awaitのエラーハンドリングはtrycatchでもいいけど、awaitか呼び出し元に.catch()つける方がスッキリするかも。Sample
Responsive Web Design
align-self
はflexbox内のitem全体ではなく、その中の特定の要素にだけalignを指定したい時に使う。あんまり使ったことなかったな。- CSS Grid内の要素はデフォルトで
align-self:stretch
になっている - repeatの引数は([回数], [値])なので、例えば
repeat(2, 1fr 50px) 20px
とするとgrid-area: 1fr 50px 1fr 50px 20px
となる。 - ここの回数の代わりに
auto-fill
を使うことができる。いつもお世話になっているよしなに調節してくれるあれですね。 auto-fit
は挙動は似ているが、containerに空きスペースがあった時に空のcellを生成する。一方でauto-fill
だとcellの幅が均等割付されてcontainerいっぱいになる。(containerが小さくて複数行になる時の挙動は一緒)- gridは入れ子にできる。やったことないな…