File size: 713 Bytes
bc20498 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
<!-- To edit this file, edit /src/README.md, not /README.md -->
# style-mod
Minimal CSS module shim for generating CSS rules for sets of style
-declarations and attaching such a set to a document or shadow root.
Using it would look something like this:
```javascript
const {StyleModule} = require("style-mod")
const myModule = new StyleModule({
"#main": {
fontFamily: "Georgia, 'Nimbus Roman No9 L'",
margin: "0"
},
".callout": {
color: "red",
fontWeight: "bold",
"&:hover": {color: "orange"}
}
})
StyleModule.mount(document, myModule)
```
This code is open source, released under an MIT license.
## Documentation
@StyleModule
Where the `Style` type is defined as:
@Style
|