Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9218925
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T02:58:44+00:00 2026-06-18T02:58:44+00:00

These are the styles my page include (the top ones return get errors on

  • 0

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

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T02:58:46+00:00Added an answer on June 18, 2026 at 2:58 am

    I think you are taking a wrong direction for using the asset-pipeline in general . If you are about to use the pipeline , you just have to keep the application.css – this is a manifest file , that you use to include your css files . My advice is to move your link href= from view and use the manifest file (application.css) like this :

    *= require_self
    *= require foundation
    *= require mobile_size
    
    ....
    *= require_tree
    

    What you are including now are precompiled css files (notice the hash prefixes) and every time you modify your assets , the hash prefix will change .

    The same is the situation with .js files – you have to include them in application.js manifest file .

    EDIT : The idea of using SASS (3.2) and media-queries (as described in this CSS-tricks article, regards to @penner) would fit nicely in this case.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a bunch of CSS files that get loaded on every page (header,
I am not clear on the actual difference between these two styles of class
I'm trying to style these links: <a class=sub href=#>Email Updates</a> <a class=sub href=#>RSS Updates</a>
Is there's any way how to reset styles back to what's in my CSS?
solution <!DOCTYPE html> should be present at the top of the page to indicate
i must set styles within other styles from a page that have a style
I want to include a silverlight application (.xap file) inside a HTML page. Using
Whenever I include my template css, jquery ui dialog box theme gets affected. Here
What is the difference between these two: font-style:italic font-style:oblique I tried using the W3Schools
There seems to be two styles of folder structure in the core Magento when

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.