Version 0.5.0
Pre-release
Pre-release
Async
The generator function now runs asynchronously. You can call it using the await
keyword or .then()
:
const html = await cssToHtml(css);
Or:
cssToHtml(css).then(html => console.log(html));
Attributes
Attribute selectors are now supported. For example:
label[for="username"] input#username[type="text"][required] {
content: 'Username';
border-radius: 0.2em;
}
Will become:
<label for="username">
<input id="username" type="text" placeholder="Username" required>
</label>
Imports
An imports
option has been added.
Option | Values | Description |
---|---|---|
imports |
include |
Fetch imported stylesheets and include them in the HTML generation process. |
style-only * |
Ignore @import rules when generating HTML. |