Is there a way to use variables from my Ruby application inside a Sass file?
            Asked
            
        
        
            Active
            
        
            Viewed 1.1k times
        
    1 Answers
33
            You can add .erb extention to your .sass file and then add your variables just like in regular .erb file:
<%= APP_CONFIG[:yourkey] %>
More information:
- 
                    10Be aware when doing this that Sass files are by default only compiled once and then served statically. – montrealmike May 12 '15 at 17:29
 - 
                    Yes...so it doesn't make sense to have a dynamic object accessible in a SASS/CSS file like you would in an html template. – Hari Honor Jan 30 '20 at 10:43