Skip to content

Instantly share code, notes, and snippets.

@tomhodgins
Last active June 11, 2020 17:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tomhodgins/f12f00e7cdca7f6ddcbc6c983f17245b to your computer and use it in GitHub Desktop.
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
/* 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