0

I'm trying to import _variables.scss file into a CSS module file to use variables to specify the colors.

_variable.css file:

$mainBlack: #000000;

navigation.module.css file:

@import "../../../commonStyles/_variables.scss";

.Navigation {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: auto;
background-color: $mainBlack;
}

Anybody knows why the color is not being imported and I can't access the $mainBlack color? I've tried using @use but this approach still doesn't work.

1 Answer 1

1

You will need to make your changes on the .scss file, make sure that everything is referenced and then compile your app.scss into app.css. You will need either SASS or Grunt to compile your .scss files.

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

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.