Skip to content

Commit 9aa3b3f

Browse files
committed
Add more steps in installation step
1 parent 4676122 commit 9aa3b3f

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,21 @@ CSS-in-JS-in-HTML is a JavaScript library which permits you to apply CSS propert
9595

9696
1. Import `index.min.js` (or `index.js`) in your HTML file
9797
```html
98-
<script src="https://cdn.jsdelivr.net/gh/ulyssear/css-in-js-in-html/index.min.js"></script>
98+
<script src="https://cdn.jsdelivr.net/gh/ulyssear/css-in-js-in-html@0.1.0/build/index.min.js"></script>
9999
```
100100

101+
2. Add one line of CSS to hide the page while building (and permits to hide elements with hidden attribute)
102+
103+
```css
104+
html[aria-busy="true"], [hidden] { display: none!important; }
105+
```
106+
107+
3. Call `CSS_in_JS_in_HTML.init(document,null)` to start the library. The optimal use case is to call it in the `DOMContentLoaded` event.
108+
109+
```js
110+
document.addEventListener('DOMContentLoaded', () => CSS_IN_JS_IN_HTML.init(document, null));
111+
```
112+
101113
#### Manual installation
102114

103115
1. Clone the repo

0 commit comments

Comments
 (0)