Closed csKangGdcomm closed 5 years ago
I am using meteor-css-modules with scss.
Our projects needs bootstrap so I installed bootstrap-sass.
bootstrap-sass
and then I configured package.json to include .scss files from the library.
After than I can see some styles on the screen but not everything.
Among bootstrap styles, only tag name styles is working but styles with class name is not working.
For example <legend> is styled but .btn is not styled. <legend> is from https://github.com/twbs/bootstrap-sass/blob/master/assets/stylesheets/bootstrap/_forms.scss and
<legend>
.btn
.btn is from https://github.com/twbs/bootstrap-sass/blob/master/assets/stylesheets/bootstrap/_buttons.scss
Can you help me to include all the styles form bootstrap??
Thank you!
below is configuration and dev codes.
// at package.json "cssModules": { "postcssPlugins": { "postcss-modules-values": {}, "postcss-modules-local-by-default": {}, "postcss-modules-extract-imports": {}, "postcss-modules-scope": {}, "autoprefixer": { "browserslist": [ "last 2 versions" ] } }, "extensions": [ "scss" ], "ignorePaths": [ "node_modules" ], "includePaths": [ "node_modules/bootstrap-sass" ], "enableSassCompilation": [ "scss" ], "parser": "postcss-scss" } // on .scss @import '{}/node_modules/bootstrap-sass/assets/stylesheets/_bootstrap.scss';
I solved problem.
I have to put @import code in :global {} then it works. !!
@import
:global {}
I am using meteor-css-modules with scss.
Our projects needs bootstrap so I installed
bootstrap-sass
.and then I configured package.json to include .scss files from the library.
After than I can see some styles on the screen but not everything.
Among bootstrap styles, only tag name styles is working but styles with class name is not working.
For example
<legend>
is styled but.btn
is not styled.<legend>
is from https://github.com/twbs/bootstrap-sass/blob/master/assets/stylesheets/bootstrap/_forms.scss and.btn
is from https://github.com/twbs/bootstrap-sass/blob/master/assets/stylesheets/bootstrap/_buttons.scssCan you help me to include all the styles form bootstrap??
Thank you!
below is configuration and dev codes.