0.0.1 • Published 7 years ago
cssthis-tag v0.0.1
cssthis-tag
This small library (190B) takes advantage of the return of cssthis-parse, to define the style for the tags created as web-components.
css
Resemble the syntax already used for the css within the shadowDom.
:host{
width : 100px;
height : 100px;
}
button{
border:1px solid black;
background : transparent;
}
##js
It allows to import the css directly from a file, note the fact that the file ends in .this.css
.
import css from "./style.this.css";
import style from "cssthis-tag";
style("my-tag")(css);
Output of the css in document.head
:host
will be replaced by the name of the tag.
my-tag{
width : 100px;
height : 100px;
}
my-tag button{
border:1px solid black;
background : transparent;
}
Consult the documentation of Cssthis, to know the installers of cssthis-parse.