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

@import URL needs to be handled differently #144

Open
LennardF1989 opened this issue Feb 2, 2022 · 1 comment
Open

@import URL needs to be handled differently #144

LennardF1989 opened this issue Feb 2, 2022 · 1 comment
Labels

Comments

@LennardF1989
Copy link

LennardF1989 commented Feb 2, 2022

According to the W3C spec, an @import always has to be on top of a CSS file. Currently, when bundling multiple CSS files that all have their own @imports (on top, respectively), Smidge does not re-order those to the top of the file. This causes a website to not fully load everything it would when not bundled.

EDIT: This could however cause some strange behavior when overriding selectors, but this is mostly used for fonts anyway.

@Shazwazza Shazwazza added the bug label Mar 11, 2022
@Shazwazza
Copy link
Owner

Ok, will have to investigate since IIRC this processor should handle it https://github.com/Shazwazza/Smidge/blob/master/src/Smidge.Core/FileProcessors/CssImportProcessor.cs#L33

But maybe this is only for a single file, I can't recall off the top of my head

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

No branches or pull requests

2 participants