Skip to content

Version 0.5.0

Pre-release
Pre-release
Compare
Choose a tag to compare
@Gigabyte5671 Gigabyte5671 released this 11 Sep 05:47
· 88 commits to main since this release
0893116

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.