Philip7899
Philip7899

Reputation: 4677

rails, heroku, css & scss: @import works in development but not production

In development, in style.css.scss I have:

@import'../typography.css';

In development, this works because I can see the effects when I load the site. The ../ is there because landing is located at app/assets/stylesheets/landing and typography.css is located at app/assets/stylesheets

I run rake assets:precompile and rake assets:clean locally before pushing. In production on Heroku, I don't think the css file is being properly called because the effects it should have do not appear. All other CSS files are being properly called because I can see the styles rendered. How do I fix this?

Upvotes: 0

Views: 416

Answers (1)

Rocco Stanzione
Rocco Stanzione

Reputation: 231

This is pretty old but I just solved the same problem by omitting the file extension, i.e.

@import '../typography';

Upvotes: 1

Related Questions