Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to include separate css without file concatenation? #852

Open
matiev opened this issue May 31, 2022 · 2 comments
Open

How to include separate css without file concatenation? #852

matiev opened this issue May 31, 2022 · 2 comments

Comments

@matiev
Copy link

matiev commented May 31, 2022

How to include separate css without file concatenation(copying/grouping) properties)?

Structure
folder src
folder sass
folder block
base.sass
header.sass
main.sass

main.sass
@import block/base
@import block/header

./public/...
converted to main.css
@import 'block/base.css'
@import 'block/header.css'

and folter block

gulpfile.js
const scss = () => {
return src('./src/sass/**/*.sass')
.pipe(sass())
.pipe(dest('./public/css/'))
.pipe(browserSync.stream())
}

@wkillerud
Copy link

Not sure I understand the problem, but if you want main.css to not have the content of block/base and block/header – instead use CSS import to load CSS in the browser – then in main.sass:

@import "block/base.css"
@import "block/header.css"

That way Sass treats @import as a CSS import.

@matiev
Copy link
Author

matiev commented May 31, 2022

Thanks for the answer. This is what I needed, it helped

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

No branches or pull requests

2 participants