Skip to content

fernandofauth/require-css

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Require.js plugin for loading CSS stylesheets

The plugin allows user to load a CSS resource via require.js. To use it, create a CSS rule in your stylesheet, e.g.:

.<file base name>-css-loaded {
	height: 1px;
}

/*for CSS file sample.css*/
.sample-css-loaded {
	height: 1px;
}	

Then require your resource along with the others:

require(['css!css/sample.css'], function() {
	alert('Stylesheet has been loaded');
});

Please, see the demo.html file for the full sample.

About

A Require.js plugin for loading CSS resources

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 52.5%
  • HTML 42.0%
  • CSS 5.5%