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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T04:33:12+00:00 2026-06-04T04:33:12+00:00

This is a question about sass best practices. Lets say I have a _colors.scss

  • 0

This is a question about sass best practices.

Lets say I have a _colors.scss file that contains variable assignments like:

 $white : #ffffff;
 $black : #000000;

And i have a _typography.scss file that uses the color variables:

 H1 {
 color: $white;
 }
 h2 {
  color : $black;
  }

In the styles.scss file:

I import as such:
@import “colors”;
@import “typography”;

My thoughts are that in the screen.scss file you would import colors first then typography. The variables are available to both typography and screen because colors was imported first.

Someone told me that you must import _colors.scss in both _typography.scss and styles.scss. Wouldn’t that be redundant?

  • 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-04T04:33:13+00:00Added an answer on June 4, 2026 at 4:33 am

    A while ago I had some issues with Rails’ asset pipeline whereby I had to import the mixin/variable stylesheet in every other stylesheet for it to precompile properly on Heroku. I have no idea if this issue still exists or not, or if it was just a problem with my configuration, but if you can import the file just once in a main stylesheet, and it works in development, and it compiles, then I think it’s safe to say you don’t have to include it twice.

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

Sidebar

Related Questions

I have this question about best practices in following examples: interface Request; interface Service
This question about Timers for windows services got me thinking: Say I have (and
This question arose when I was working on answering another question about best practices
I have asked this question about using the a Linq method that returns one
I have seen this question about deploying to WebSphere using the WAS ant tasks.
I have a question about this question . I posted a reply there but
This question about unit tests sparked another thing that's been bothering me. I've gone
This is a general design question about how to make a web application that
I have this question about umbraco structuring and I can't find the answer anywhere.
This question is a follow-up on a question about Python variable scope . Additional

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.