Skip to content
This repository has been archived by the owner on Sep 11, 2018. It is now read-only.

I can't manage to import a global scss file for the whole project #1173

Closed
ghost opened this issue Feb 15, 2017 · 5 comments
Closed

I can't manage to import a global scss file for the whole project #1173

ghost opened this issue Feb 15, 2017 · 5 comments

Comments

@ghost
Copy link

ghost commented Feb 15, 2017

I want to import a _default.scss file from _base to have default rules that should be applied to the whole project I'm building, but I can't make it work. No errors nor anything is shown.

I have the following styles folder structure:

styles/
----/components/
--------/Home/
--------/Dashboard/
--------_default.scss
----/fonts/
--------/...
----_base.scss
----core.scss

And I tried the following in _base.scss:
@import './components/_default.scss',
@import './components/_default' and
@import './components/default.

I have cloned it without picking up any version and I haven't made any alteration but these.

@piu130
Copy link

piu130 commented Feb 16, 2017

This works for me

styles/
----components/
------_default.scss
----_base.scss

With _default.scss

* { background-color: black; }

And _base.scss

@import './components/default';

Makes every background black.
Don't forget ' and ;

@ghost
Copy link
Author

ghost commented Feb 17, 2017

@piu130 I tried it already, it doesn't work for me... why? What could I have possibly done wrong?! Agh.

@piu130
Copy link

piu130 commented Feb 17, 2017

Are you trying to override some bootstrap-style imported on line #7 in index.html. Or some normalize-style imported on line #2 in core.scss?

If not could you post your _default.scss content?

@ghost
Copy link
Author

ghost commented Feb 17, 2017 via email

@dvdzkwsk
Copy link
Owner

Just released a bunch of changes: https://github.com/davezuko/react-redux-starter-kit/releases/tag/v3.0.0.

I recommend putting your global styles in ./src/styles/main.scss and seeing if they get loaded. If they don't, let me know and we can revisit.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants