I'm currently exploring the concept of css precedence rules in rails.
In my application, I am looking to apply different css rules based on different controllers. However, when I add css to one of the css.scss files, it ends up affecting all controller pages.
Here are snippets from admin.css.scss and rsv_ps.css.scss:
body {
background: #fff;
}
body {
background: url("DSC_1581.JPG") no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='DSC_1581.JPG', sizingMethod='scale');
-ms-filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='DSC_1581.JPG', sizingMethod='scale')";
}
Strangely, when I visit both http://localhost:3000/admin
or http://localhost:3000/rsvps/new
, they both display the background image.
Shouldn't URLs starting with http://localhost:3000/admin
use the admin.css.scss stylesheet instead of the rsv_ps.css.scss stylesheet?