先日、久々に凝ったレイアウトのレスポンシブ・ウェブサイトのCSSをがっつり書いていて、やっぱりメディアクエリはモジュール(ページ要素)ごとにまとめて書いた方が良いというのを実感しました。ブレイクポイントでまとめて書くとブラウザで確認しながら細かいレイアウトの調整をするのが大変なんですね。 レイアウトの調整が細かければ細かいほど、メディアクエリはモジュールごとにまとめて書くのが良いです。途中で書き直すのは結構大変なので、これからレスポンシブなサイトのコーディングを始める方で迷っている方、お気をつけください。 以上、Rriverからのお知らせでした。笑 手短に言ってしまうと、伝えたいことは以上なんですけど、もう少し説明してみます。 メディアクエリをモジュールごとにまとめた方が良い理由 なぜメディアクエリはモジュールごとにまとめて書いた方が良いのか? それは、以下の3つが理由です: 丁寧なレスポ