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

  • Home
  • SEARCH
  • 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 6378723
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T02:02:42+00:00 2026-05-25T02:02:42+00:00

I use @import ‘d partial sheets to organize my css/sass: /app /assets /stylesheets _constants.sass

  • 0

I use @import‘d partial sheets to organize my css/sass:

/app
  /assets
    /stylesheets
      _constants.sass
      _layout.sass
      ...
      app.css.sass

app.css.sass:
  @import _constants.sass
  // basic styles
  @import _layout.sass
  @import ...

app.css.sass has an @import rule for _layout.sass, which allows me to share mixins and variables amongst the raw sass files before they’re complied down into app.css

The problem is that Rails doesn’t recognize changes to the @import‘d partials (_layout.sass) and won’t regenerate app.css until I make a change to the actual app.css.sass file itself. This dramatically slows down my workflow and means I have to add/remove blank lines from app.css.sass to see changes. Never had this problem in 3.0.

Is there a way of forcing sass assets to regenerate on every server request in development?

  • 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-05-25T02:02:42+00:00Added an answer on May 25, 2026 at 2:02 am

    Using a depend_on directive may do what you require. This makes the given file a dependency of the base file (so the base file is regenerated when the dependency changes), but doesn’t include it in the bundle.

    For example:

    /*
    *= depend_on _layout.sass
    *= depend_on _constants.sass
    */
    @import _layout.sass
    @import _constants.sass
    

    See this sass and sprockets blog post as well as the sprockets documentation (especially the directives section).

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

Sidebar

Related Questions

Is it possible to use @import in one css file like this. @import file1
In my Android app I use: import javax.xml.bind.JAXBContext; But I get: The import javax.xml.bind
If it possible to use @import in a .css file to load a style
I'm using SASS to load stylesheets in a Rails 3.1(sass-rails 3.1) app. For example,
A lot of modules I use import entire files into memory or trickle a
It is recommended to not to use import * in Python. Can anyone please
I've been trying to use 'import poplib' to access gmail, since I have Pop
'''use Jython''' import shutil print dir(shutil) There is no, shutil.move, how does one move
When I use an import such as <script type=text/javascript src=http://o.aolcdn.com/dojo/1.2.3/dojo/dojo.xd.js djConfig=parseOnLoad:true, isDebug: true></script> I
I have a web application that you can use to import information from another

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.