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 8206993
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T08:51:37+00:00 2026-06-07T08:51:37+00:00

Due to a specific setup, I would like to split the compiled stylesheets in

  • 0

Due to a specific setup, I would like to split the compiled stylesheets in two files. This is because (a part of) the CSS is needed for a Java application which can parse the CSS, but it is a bit buggy and can’t handle some css-(hack)-syntax. Because I am unable to modify this Java application, I want to feed it only the CSS which it needs and of which I can make sure it is correct.

So, normally the assets pipeline would produce just one ‘/assets/application-[..].css’ file. It would to let it also generate ‘/assets/custom-[..].css’, based on a file selection I make. This still can be pre-compiled.

Is there a way to do this? Although I understand this is not the ideal setup..

  • 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-07T08:51:39+00:00Added an answer on June 7, 2026 at 8:51 am

    To tell rails about additional files you wish to have precompiled, you can add them to the config.assets.precompile setting.

    config.assets.precompile += ["other_application.css"]
    

    You only see application.css in your HTML because that’s the only file you’re including

    <%= stylesheet_link_tag "application" %>
    

    If you have some custom.css.scss in your apps/assets/stylesheets directory, it will be compiled just like application.css.

    For example, I might have

    - _common.css.scss
    - application.css.erb.scss
    - other_application.css.erb.scss
    

    in app/assets/stylesheets. In the top of the non-partial files I will put

    @import "common";
    

    to include _common.css.scss. I can now reference either stylesheet independent of one another in a layout.

    <%= stylesheet_link_tag "application" %>
    # or
    <%= stylesheet_link_tag "other_application" %>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Due to a sad situation I receive HTML like this: <p>Perform the following commands:
Due to specific requirements [*], I need a singly-linked list implementation that uses integer
Due to some css limitations between IE and the rest of the world I
Due to a harddrive crash, I lost my SQL server database files for a
Due to the lack of documentation for this on MSDN, I am forced to
NOTE Due to the successful outcome of this thread, the documentation at the provided
I've been thinking about virtualizing part or all of my RoR development environment. This
I have this assignment due that requires the usage of FLTK. The code is
I want to solve a common but very specific problem: due to OCR errors,
I have a ComboBox bound to a property with a specific value and due

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.