Comparing version 4.0.4 to 4.0.5
{ | ||
"name": "sheetify", | ||
"version": "4.0.4", | ||
"version": "4.0.5", | ||
"description": "Modular CSS bundler", | ||
@@ -5,0 +5,0 @@ "repository": "sheetify/sheetify", |
@@ -67,2 +67,30 @@ # sheetify | ||
## Styling host elements | ||
The element that gets a prefix applied can be styled using the [`:host` | ||
pseudoselector][1]: | ||
```js | ||
const vdom = require('virtual-dom') | ||
const hyperx = require('hyperx') | ||
const sf = require('sheetify') | ||
const hx = hyperx(vdom.h) | ||
const prefix = sf` | ||
:host { | ||
background-color: blue; | ||
} | ||
:host > h1 { | ||
text-decoration: underline; | ||
} | ||
` | ||
const tree = hx` | ||
<section className=${prefix}> | ||
<h1>My beautiful, centered title</h1> | ||
</section> | ||
` | ||
document.body.appendChild(vdom.create(tree)) | ||
``` | ||
## External files | ||
@@ -229,1 +257,2 @@ To include an external CSS file you can pass a path to sheetify as | ||
[standard-url]: https://github.com/feross/standard | ||
[1]: http://www.html5rocks.com/en/tutorials/webcomponents/shadowdom-201/#toc-style-host |
@@ -88,3 +88,2 @@ const mapLimit = require('map-limit') | ||
const ws = opts.out | ||
eos(ws, done) | ||
node.update('"' + prefix + '"') | ||
@@ -91,0 +90,0 @@ ws.write(css) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
26920
257
557
1