title: .NET MVC Razor - Scoped Styles
body: <p>Currently I'm trying to use a partial view inside one of my views which uses a <em>different</em> css style sheet. However, the styles from the main view are being carried over because of the way styles are rendered in Razor: <code>@Styles.Render("~/Content/css")</code> simply applies to everything, and I can't seem to find any documentation on scoped css in Razor.</p>
  
  <p>Doing the below code does not work - I believe because Razor handles Styles.Render by simply placing in the head.</p>
  
  <pre><code>&lt;div&gt;
      &lt;style scoped&gt;
          @Styles.Render("~/Content/othercss")
      &lt;/style&gt;
      @Html.Partial("~\\Views\\Layouts\\blog.cshtml")
  &lt;/div&gt;
  </code></pre>
  
  <p>Does anyone know of a workaround for this?</p>