Last active
June 11, 2020 17:34
-
-
Save tomhodgins/f12f00e7cdca7f6ddcbc6c983f17245b to your computer and use it in GitHub Desktop.
Some ideas about how @--import and @--export could be used to pass CSS objects between files
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Export individual rules from a stylesheet */ | |
@--export a {} | |
@--export b {} | |
@--export c {} | |
/* Define a list of rules as a default export for the stylesheet */ | |
@--export { | |
d {} | |
e {} | |
f {} | |
} | |
/* Name an exported list of rules */ | |
@--export named-list { | |
g {} | |
h {} | |
i {} | |
} | |
/* Import a stylesheet's default export only */ | |
@--import 'stylesheet.css'; | |
@--import url(stylesheet.css); | |
/* Import exported objects by selector and/or exported name */ | |
@--import (a, b, c) from 'stylesheet.css'; | |
@--import (buttons, badges) from url(framework.css); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment