These are the styles my page include (the top ones return get errors on production)
<link href="/assets/foundation.css" rel="stylesheet" type="text/css" />
<link href="/assets/app.css" rel="stylesheet" type="text/css" />
<link href="/assets/full_size.css" media="screen and (min-width: 761px)" rel="stylesheet" type="text/css" />
<link href="/assets/mobile_size.css" media="screen and (max-width: 760px)" rel="stylesheet" type="text/css" />
<link href="/assets/application-b0a44b2bbc0d3c94d855fbb830c2098d.css" media="screen" rel="stylesheet" type="text/css" />
<script src="/assets/application-cd6a361c13ee838fceb09ecb2c58c467.js" type="text/javascript"></script>
My website is responsive so I want the styles to be included as they are needed based on the screen's size. Is there a way to precomplie my css separately so that it looks like this:
<link href="/assets/foundation-b0a44b2bbc0d3c94d855fbb830c2098d.css" rel="stylesheet" type="text/css" />
<link href="/assets/app-b0a44b2bbc0d3c94d855fbb830c2098d.css" rel="stylesheet" type="text/css" />
<link href="/assets/full_size-b0a44b2bbc0d3c94d855fbb830c2098d.css" media="screen and (min-width: 761px)" rel="stylesheet" type="text/css" />
<link href="/assets/mobile_size-b0a44b2bbc0d3c94d855fbb830c2098d.css" media="screen and (max-width: 760px)" rel="stylesheet" type="text/css" />
Then there would be no need for application.css, also combining it all breaks my css. My website looked good in development :)
for now ive set config.assets.enabled = false in the config/application.rb, would it be a better idea to compress the css and it include it manually on my own?
This is somewhat similar to this question except I don't like any of the answers. Surely there is a simple solution to this. Using Rails 3.1 assets pipeline to conditionally use certain css