# Functions
BlickCss provides access to certain of its functions.
# Config
blick.config({
// your configuration
})
Read more here
# Parser
blick.parse("h:m-20", "class")
The first parameter is a token (one class), the second parameter is which attribute the first parameter refers to. The result should be a structure like this
{
states: [
{ raw: "h", val: ":hover", type: "pseudo" }
],
styles: [
{
src: { _prop: "margin:$", _unit: "px" },
path: [ "m" ],
prop: "margin:$",
values: [
{ val: "20px", raw: "20" }
],
rawVal: "20",
val: "20px",
unit: "px",
join: " ",
important: false
}
],
attr: "class",
selector: ".h\\:m-20",
token: "h:m-20",
extra: null,
create(){...}
}
blick.parse("h:m-20", "class").create()
{
media: null,
selector: ".h\\:m-20:hover",
styles: [
"margin:20px"
],
css(){...}
}
blick.parse("h:m-20", "class").create().css()
".h\\:m-20:hover{margin:20px}"
Read more here
# Html
This function does not process individual tokens, but the entire html code
blick.html('<div class="m-20 flex">')
// output:
".m-20{margin:20px}.flex{display:flex}"