Skip to content

Lilipi/load-css-file

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

insert css file into the `<head>` element

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 68.1%
  • HTML 31.9%