Side Bar

CSS Constant Data

ProposeJS: CSS Constant Data

Define CSS Constant Data

CSS constant data will apply to every possible webpage. To define CSS constant data, follow the steps below:

1. Create A CSS File

Create a CSS file to store CSS constant data:

constant/constant.css
 h1 {
	font-size: 25px;
 }


2. Update the propose.json File

Make a proposal for CSS constant data in the propose.json file:

/propose.json
 {
  "css": {
    "constant": ["/constant/constant.css"]
    }
 }

Note

  • CSS constant data will apply to every state or webpage.
  • It's possible to make multiple proposals for CSS constant data.
  • CSS constant data will execute only once on the load event.

How It Works

CSS constant data will apply to every possible webpage. The CSS constant will be fetched only once and will not be fetched again until the webpage is refreshed.

Footer