-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
Unable to import mounted CSS into SCSS. #10592
Comments
your module imports contains remapped path, try using -- theme = 'github.com/razonyang/hugo-lab'
++ [[module.imports]]
++ path = "github.com/razonyang/hugo-lab" https://github.com/razonyang/hugo-lab/blob/scss-import-css/exampleSite/config.toml#L4 |
Thanks, but doesn't help, same error reached. I think the |
turns out, if we explicitly write the full path with the extension, it does resolves correctly. @import "foo/bar";
@import "tingle.js/tingle.css"; |
@pamubay Thanks, I've tried this before, but SASS just replace it with What I wish is that append the CSS content like |
From the top of my head:
|
This works: config.toml
main.scss
|
See:
If the import URL ends with If it does not end with I think we need to change the import resolver. |
Applicable to Dart Sass only: - Sass imports with the .css extension indicate a plain CSS @import. - Sass imports without the .css extension are imported at compile time. Fixes gohugoio#10592
In your initial comment, you wrote:
Did you mean this instead?
|
@jmooring I am not good at English, I mean as same as your previous comment pointed out.
|
Applicable to Dart Sass only: - Sass imports with the .css extension indicate a plain CSS @import. - Sass imports without the .css extension are imported at compile time. Fixes gohugoio#10592
Applicable to Dart Sass only: - Sass imports with the .css extension indicate a plain CSS @import. - Sass imports without the .css extension are imported at compile time. Fixes gohugoio#10592
I merged 2662faf which improves the situation, but I'm not sure it totally solves it, so I'll reopen this for now. As I understand it:
|
To clarify, CSS imports with a ".css" extension ( 2662faf has no effect on import statements where the provided path includes an extension. But if an import statement without an extension can be resolved to a file with the ".css" extension in a mounted directory, we now compile it as we should, per the Dart Sass documentation. In my opinion, if a site author includes the ".css" extension in an import statement, it is their responsibility to make sure the file is served at the provided URL, regardless of whether file is hosted somewhere else or self-hosted. |
OK, second thought, I'll close this ... again. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Hi, Hugo seems doesn't able to load mounted CSS file into SCSS, but normal CSS files are OK.
What version of Hugo are you using (
hugo version
)?Does this issue reproduce with the latest release?
Yep.
Log
Reproduce steps
Both
libsass
anddartsass
are not working.The text was updated successfully, but these errors were encountered: