1. steal-css
CSS plugin for StealJS
steal-css
Package: steal-css
Created by: stealjs
Last modified: Mon, 27 Jun 2022 00:14:23 GMT
Version: 1.3.2
License: MIT
Downloads: 1,495
Repository: https://github.com/stealjs/steal-css

Install

npm install steal-css
yarn add steal-css

Build Status
npm version

steal-css

API

{Object}

steal-css is a plugin for Steal that helps with loading CSS.

Object

  • CSSModule {CSSModule(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

  • 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.

     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].

License

MIT

RELATED POST

10 Must-Know Windows Shortcuts That Will Save You Time

10 Must-Know Windows Shortcuts That Will Save You Time

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Navigating AWS Networking: Essential Hacks for Smooth Operation

Navigating AWS Networking: Essential Hacks for Smooth Operation

Achieving Stunning Visuals with Unity's Global Illumination

Achieving Stunning Visuals with Unity's Global Illumination

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code