https://github.com/stealjs/steal-css
StealJS plugin for CSS
https://github.com/stealjs/steal-css
Last synced: 6 months ago
JSON representation
StealJS plugin for CSS
- Host: GitHub
- URL: https://github.com/stealjs/steal-css
- Owner: stealjs
- License: mit
- Created: 2015-03-23T20:33:29.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2020-05-28T12:15:14.000Z (almost 5 years ago)
- Last Synced: 2024-11-11T20:17:12.004Z (6 months ago)
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/steal-css
- Size: 211 KB
- Stars: 2
- Watchers: 13
- Forks: 1
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://travis-ci.org/stealjs/steal-css)
[](http://badge.fury.io/js/steal-css)# steal-css
-
[__steal-css__ Object](#steal-css-object)
-[cssOptions Object](#cssoptions-object)
## API
## `{Object}`
**steal-css** is a plugin for Steal that helps with loading CSS.###
Object
- __CSSModule__
{[CSSModule](#new-cssmoduleaddress-source)(address, source)}
:
The CSSModule property is a constructor function that facilitates most of what steal-css provides. End users never need to use this functionality, it is provided for plugin authors that seek to extend steal-css' core behavior.
### cssOptions `{Object}`Specifies configuration options that will be applied to [steal-css](#-object).
####
Object
- __timeout__
{Integer}
:
This specifies the time (in seconds) steal will try to load a css file, within a javascript module (e.g. `require('./mycssfile.css')`, in __production mode__.
```js
steal.config({
cssOptions: {
timeout: 15
}
});
```
If no `timeout` is provided, the default value will be `60` seconds.
Note:
No javascript code will be execute until the CSS file is loaded. If the timeout is reached or loading the file will fail, StealJS terminates execution.
The benefit of this behavior, you don't get unstyled content in __production mode__. For example, if you are using [steal-tools.guides.progressive_loading].
## LicenseMIT