Skip to content

Commit 5861957

Browse files
committed
Add an options argument for customizing the behaviour of the generator
1 parent 06c3b09 commit 5861957

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Generator.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
type Combinator = '>' | '~' | '+';
22

3+
interface Options {
4+
}
5+
36
/**
47
* Generate an HTML document from CSS.
58
* @param css The style sheet.
69
* @returns An HTML body element containing the generated DOM.
710
*/
8-
export function cssToHtml(css: CSSRuleList | string): HTMLBodyElement {
11+
export function cssToHtml(css: CSSRuleList | string, options: Options = {}): HTMLBodyElement {
912
const output = document.createElement('body');
1013
let styleRules: CSSRuleList | undefined;
1114
// Parse the CSS string into a CSSOM.

0 commit comments

Comments
 (0)