Background
I have an existing website where I want to import Bootstrap CSS styles. The styles are clashing, so I want to scope the rules.
Example
// node_modules/bootstrap-sass/assets/stylesheets/bootstrap/_modals.scss
.modal {
display: none;
overflow: hidden;
position: fixed;
top: 0;
right: 0;
bottom: 0;
}
// ---
// my-styles.scss
.my-selector {
@import "node_modules/bootstrap-sass/assets/stylesheets/bootstrap/modals";
}
This results in .my-selector .modal
, but I want to have .my-selector.modal
.
I want to avoid having to copy-paste the style rules. If I can somehow do it with @extend it would be already great.
Thanks for any suggestions.