Feature Request: Include SCSS files in build
See original GitHub issueI’d like to customise the styles of this package and thus include the SCSS files into my build process. Unfortunately, only compiled CSS files are included. It would be great if the SCSS files would be there as well, just as in the bootstrap 4
package. I solved this via including the package as a git submodule, but this is not optimal, as I would like to control its version centrally via package.json
.
It would also be cool if the SCSS were prepared for customisation, i.e. by using variables instead of fixed values. Also for this, the bootstrap 4
package is a good reference.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:5 (4 by maintainers)
Top Results From Across the Web
import `.scss` and other types of files within javascript ... - GitHub
Feature request : import .scss and other types of files within javascript ... I even tried rm -rf .meteor/local/build && meteor to no...
Read more >Sass: @import
Sass extends CSS's @import rule with the ability to import Sass and CSS stylesheets, providing access to mixins, functions, and variables and combining ......
Read more >Import regular CSS file in SCSS file? - sass - Stack Overflow
I just want to point out that as December 2014, this issue has been resolved. It is now possible to import css files...
Read more >gulp-sass - npm
If you have a feature request/question about how Sass works/concerns on how your Sass gets compiled/errors in your compiling, it's likely a Dart ......
Read more >import - CSS: Cascading Style Sheets - MDN Web Docs
The @import CSS at-rule is used to import style rules from other valid stylesheets. An @import rule must be defined at the top...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @ericgio Thanks a lot for your fast response!
Yes, overriding CSS is of course possible, but not as elegant as including the SCSS files directly.
Here is how it works for Bootstrap (and other libraries):
_variables.scss
file to use these variables instead of hard-coded values.$primary
color of the Bootstrap theme. All the rest of Bootstrap will then use the new color instead of the default one (blue). Bootstrap even calculates colors that depend on that, e.g. a lighter version of the primary color, a shadow etc.So, the files will be imported like this:
To enable this, two things are required:
webpack
(or Meteor in my case) then transpiles everything to CSS.Hope my description is clear enough. If not, don’t hesitate to reach out again 😃
As of v4.0.0-rc.2 I’ve included the bare .scss files with the package (in the /css dir along with the previously available styles). The files are still specifying values directly rather than using variables, so not sure how helpful they’ll be for the use case described above. If anyone wants to help move this issue forward by submitting a pull request, I’d welcome that.