What makes a 'CSS Package'?
tomhodgins opened this issue · comments
What does it mean to make a 'CSS package' and what information is needed to handle it and all of its information and dependencies?
I wonder if a 'package' is defined by a CSS stylesheet in 100% valid CSS syntax, maybe using a custom at-rule like @--package
to wrap a list of declarations similar to the properties defined in a package.json file for an npm module.
When a 'css package' is referenced or consumed, this stylesheet acts as the entrypoint. Inside it, the tooling that works with CSS packages should be able to learn:
- metadata about the package: name, description, author, license, homepage, etc
- which files and folders of CSS to process
- any external dependencies (libraries, frameworks, worklets, plugins, etc)
- any preprocessing instructions for the CSS
- any postprocessing instructions for the CSS (formatting, minification, etc)
Should it indicate something about the output formats or types (CSS, JavaScript, other assets generated during the process).
I've put an example for this idea at /examples/package.css
What do you think is needed for this to work?
Other questions about this might be:
-
Must the
package.css
file contain only 1@--package {}
at-rule or something like that, or could that same file also include CSS below? -
Can any CSS file that includes a
@--package {}
be consumed as a CSS package (or should it be a standalone file that points to a stylesheet? -
Can more than one
@--package {}
be put in the same file? -
Should you name packages in a
name:;
property, or like@--package my-website {}