New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

hobostyle

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hobostyle

Dynamic CSS for your web page!!!

latest
Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
176
-25.11%
Maintainers
1
Weekly downloads
 
Created
Source

Hobo Style

Dynamic CSS for your web page!!!

How to use?

Assuming you're using browserify:

npm install hobostyle

Then

var hobostyle = require('hobostyle');
var mystyle = hobostyle.style('body { background-color: blue; }');

Then later,

mystyle.set('body { background-color: red; }');

API

Style

var mystyle = hobostyle.style(css);

This will create a new <style> element in your <head> containing css.

mystyle.set(newCss);

This will replace the original css with newCss, in the same <style> element.

mystyle.remove();

Will remove the style element.

var mystyle = hobostyle.link(cssUrl);

This will create a new <link type="stylesheet" href="..."> element in your <head> linking to cssUrl.

mystyle.set(newCssUrl);

This will set the href to newCssUrl.

mystyle.remove();

Will remove the style element.

Keywords

css

FAQs

Package last updated on 12 Aug 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts