0

I'm using compass, try to import my custom scss file in application.scss and have this error: enter image description here

here my application.scss code:

/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
 * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the top of the
 * compiled file, but it's generally better to create a new file per style scope.
 *
 *= require_self
 *= require_tree
 */

@import "foundation_and_overrides";
@import "pnp";

if I remove require_tree error message will disappear but my scss file (pnp.scss) will not be loaded to the page

1
  • Where is the button mixin located? It seems your pnp file is trying to use it, but it cannot find it. Commented Oct 7, 2013 at 12:21

2 Answers 2

1

Create a new file called custom.css.scss in app/assets/stylesheets and then use all the imports there

@import "foundation_and_overrides";
@import "pnp";

Hope it helps.

Sign up to request clarification or add additional context in comments.

Comments

0

You're problem may be that require_self is occurring before require_tree. Meaning that pnp styles won't have access to any other style sheets that may be loaded after it (ie, that contain a mix in).

To avoid this kind of confusion, I usually keep all imports in one SCSS file and just require that in application.css.

# application.css

/*
 *= require normalize
 *= require base
*/


# base.scss

@import "foundation_and_overrides";
@import "constants";
@import "buttons";
@import "pnp";

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.