Reputation: 1211
I am using Foundation 6 which has a nice scss structure. But how can I add a global parent selector for its output css?
I need to do this for one odd site to avoid css overwritten (i will do a css reset first). Currently I have to manually do a nesting on the output css and render it again to make it work,
.this-site-only {
%final css output%
}
I guess I can achieve the same result using Gulp or WebPack but i am also curious to know if there is any SCSS/SASS way to to this?
Upvotes: 0
Views: 506
Reputation: 57
If I understood your question correctly. You can simply wrap your imports into your desired selector in your main SCSS file (in my case app.scss
).
Then you would have something like that:
.this-site-only{
@import 'foundation';
@import 'your-stuff';
.your-style{
color: #000;
font-size: 20px;
}
}
Upvotes: 1