-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
This is meant to document recent discussions on the expectations for what steal-css gives you. ccing possibly interested parties; @mjstahl @kylegifford @pYr0x @justinbmeyer @ccummings @James0x57
What steal-css is today
For the sake of clarity this is what steal-css does for you today:
- Allows you to import css from JavaScript. This css is injected into the
<head>of your document. - Rewrites
@importstatements to be relative to the css file. - Rewrites
url()expressions to be relative to the css file. - Supports the use of the locate scheme.
That's it.
Problems / expectations
- The introduction of locate scheme changed expectations for what steal-css provides, it does not provide modularity to your CSS dependency tree.
@importstill behaves the same as if you used it within a<link>or<style>tag. This makes it somewhat of an anti-feature if used in a project with more than 1 CSS dependency tree (virtually all Steal projects).
Possible Solutions
- Define a meta-language on top of CSS that makes the CSS dependency graph part of the Steal dependency graph. ie; create a better
@importfor CSS. - Provide hooks that existing compile-to-CSS languages can use to integrate with this. Lots of hand-waving as I don't know what this would entail; but in the case of less you can't simply ignore subsequent imports. It would be nice of steal-css could account for that some how.
Metadata
Metadata
Assignees
Labels
No labels