Open gmemstr opened 4 years ago
I personally quite like the idea of embedding the packages directly into the stylesheet, although I wonder how easy the second, "alternative" approach would be. Maybe we take a hybrid approach? e.g
@--package-bootstrap {}
body {
display: bootstrap-display;
}
Feel free to correct my CSS formatting but that's sort of what I have in my head. @--package-
would help us parse out the packages that need to be brought in, maybe with the ability to define explicit URLs/versions/hashes with
@--package-bootstrap {
url: url("https://example.com/bootstrap/v1.css");
}
(again, CSS syntax isn't perfect)
index.css
@require("package-one")
@require("package-two")
main {
/* normal styles */
}
You could then maybe use PostCSS to take note of all the require statements before stripping them out.
Let's brainstorm how we could make this work!
Taken from Discord: