I'm attempting to change my application.bootstrap.scss
file to application.bootstrap.scss.erb
so I can do an ERB case statement to give users a different set of variables depending on the skin they chose with their account.
The website is still appearing on refresh, but none of the CSS is updating. In my bin/dev
server I am getting this error:
Error reading app/assets/stylesheets/application.bootstrap.scss: no such file or directory.
I have added this line to my environments/development.rb
as recommended in this post:
config.serve_static_assets = false
And I added this line to my manifest.js
:
//= link application.bootstrap.scss.erb
Here's the code I have in my assets/stylesheets/application.bootstrap.scss
:
<% user_skin = "Ravenclaw Dark" %>
<% case user_skin %>
<% when "Ravenclaw Dark" %>
@import 'ravenclaw-dark';
<% else %>
@import 'ravenclaw-light';
<% end %>
Which references ravenclaw-dark.scss
and ravenclaw-light.scss
files that look like this:
$color-background: #fff !important; /* Main background */
$color-text: #000 !important; /* Main text (contrast bg) */
$color-background-alt: #b9b8b6 !important; /* Alternate background */
$color-text-alt: #0E1A40 !important; /* Alternate text */
$color-admin: #FEC601 !important; /* CTAs & accents (main/opp txt ok) */
$color-accent-main: #1567B3 !important; /* Good with main/opp text */
$color-accent-subtle: #8CA7B0 !important; /* Subtle (main/opp text) */
$color-bad: #983C3C !important; /* both text */
$color-good: #2C8431 !important; /* both text */
Can anyone see where I'm going wrong?