defstyle - Respo/respo.calcit GitHub Wiki
Creates a CSS rule:
ns app.demo
defstyle css-item $ {}
|$0 $ {}
:cursor :pointer
|$0:hover $ {}
:background-color $ hsl 0 0 96
It returns a string css-item__app_demo
and meanwhile generates CSS code that used in <style/>
element:
.css-item__app_demo {
cursor: pointer;
}
.css-item__app_demo:hover {
background-color: hsl(0, 0%, 96%);
}
For Node.js HTML rendering, styles are collected in respo.css/*style-list-in-nodejs
, which can be concatenated to a string:
.join-str @*style-list-in-nodejs (str &newline &newline)