1 parent 97a4790 commit 7826de6Copy full SHA for 7826de6
1 file changed
src/utils/style.js
@@ -0,0 +1,16 @@
1
+// Custom CSS classes are great.
2
+const style = (() => {
3
+ const el = document.createElement('style');
4
+ el.type = 'text/css';
5
+ document.head.append(el);
6
+
7
+ function add(...styles) {
8
+ styles.forEach((style) => {
9
+ el.appendChild(document.createTextNode(style));
10
+ });
11
+ }
12
13
+ return {
14
+ add,
15
+ };
16
+})();
0 commit comments