<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>MAS3</author_name>
  <author_url>https://blog.hatena.ne.jp/MAS3/</author_url>
  <blog_title>自作のソフト開発記録</blog_title>
  <blog_url>https://mas3.hatenadiary.org/</blog_url>
  <categories>
    <anon>Ruby</anon>
  </categories>
  <description>自分用メモ。画面固有のスタイルは個別のファイルに書くようになっているわけですが、そのままの設定だと結局どの画面からも全部のファイルが読み込まれてしまい、セレクタがかぶらないように気を遣わないといけません。これだったら同じファイルに書く方が管理しやすいですね。そこで、コントローラ毎にCSSを分ける方法の登場です。一つ目の方法はyieldにパラメータをつける方法。まずは自動で読み込まれないようにするためにapp/assets/styleshet/application.cssから以下の行を消してきます。 *= require_tree .そしてlayouts/application.html.er…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fmas3.hatenadiary.org%2Fentry%2F20120408%2Fp1&quot; title=&quot;Railsでcontrollerやview毎にCSSを分ける - 自作のソフト開発記録&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2012-04-08 00:00:00</published>
  <title>Railsでcontrollerやview毎にCSSを分ける</title>
  <type>rich</type>
  <url>https://mas3.hatenadiary.org/entry/20120408/p1</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
