CSS
Bundles and loads CSS stylesheets referred from JavaScript module dependendencies.
TODO: Write the documentation.
Load CSS bundle
Stylesheet bundles are loaded by a call to styleLoad in bundle indexes, for example:
define([
...
], {});
require(['require', 'css'], function (require, css) {
css.styleLoad(require, 'csui/bundles/csui-browse');
});
styleLoad(require, bundleName, separateRTLCSS?)
require- therequirefunction required for the module, where thestyleLoadis going to be calledbundleName- the name of the module bundle, for which the stylesheet will be loadedseparateRTLCSS- if the stylesheet for the RTL text-writing direction is in the same or in a separate file (default istrue)
If separateRTLCSS is true or not specified and the selected UI language requires the RTL text-writing direction, the stylesheet name will include the suffix -rtl. The RTL stylesheet will be used instead of the default one:
| Bundle name | LTR text-writing direction | RTL text-writing direction |
|---|---|---|
csui/bundles/csui-browse | csui/bundles/csui-browse.css | csui/bundles/csui-browse-rtl.css |
If separateRTLCSS is false and the selected UI language requires the RTL text-writing direction, the default stylesheet name will be used. The default stylesheet is supposed to contain styles supporting both LTR and RTL text-writing direction:
| Bundle name | LTR text-writing direction | RTL text-writing direction |
|---|---|---|
csui/bundles/csui-browse | csui/bundles/csui-browse.css | csui/bundles/csui-browse.css |