Hobo Style
Dynamic CSS for your web page!!!
How to use?
Assuming you're using browserify:
npm install hobostyle
Then
var hobostyle = ;
var mystyle = hobostylestyle'body { background-color: blue; }';
Then later,
mystyle;
API
Style
var mystyle = hobostylestylecss;
This will create a new <style>
element in your <head>
containing css
.
mystyle;
This will replace the original css with newCss
, in the same <style>
element.
mystyle;
Will remove the style element.
Link
var mystyle = hobostylelinkcssUrl;
This will create a new <link type="stylesheet" href="...">
element in your <head>
linking to cssUrl
.
mystyle;
This will set the href to newCssUrl
.
mystyle;
Will remove the style element.