This plugin can be used to load a CSS file.
Make sure the CSS file will only apply so specific items within your widget, so use very specific
class names to target your widget.
A good practice is to mark your root domNode with a unique class (e.g. "bcMySpecificPlugin"), and target all CSS rules within this class.
<!-- mySpecificPlugin.html --> <div class="bcMySpecificPlugin"> <div class="myDivClass"> Example text in red. </div> </div>
/* mySpecificPlugin.css */ .bcMySpecificPlugin .myDivClass { color: red; }
Loading the above CSS file goes as follows:
Example
/* mySpecificPlugin.js */
define([
"blueconic/api/plugins/css!./mySpecificPlugin.css"
], function(){
// widget here, the CSS file is automatically loaded.
});