Skip to content

Latest commit

 

History

History
38 lines (23 loc) · 595 Bytes

readme.md

File metadata and controls

38 lines (23 loc) · 595 Bytes

load-css-file

insert css file into the <head> element

install

npm install load-css-file --save

usage

var loadCss = require('load-css-file');
loadCss('https://raw.githubusercontent.com/necolas/normalize.css/master/normalize.css');

// or

loadCss({
  href: 'normalize.css',
  rel: 'stylesheet',
  text: 'text/css'
})

api

loadCss(source)

source string where to load the css from.

loadCss(object)

css attribute object. For available attributes see html link specification. e.g. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link