Side Bar

CSS Common Data

ProposeJS: CSS common Data

Defining CSS Common Data

CSS Common Data executes on a particular directory. To define CSS common data, follow the steps below:

1. Create a CSS File

Create a CSS file to store CSS common data:

/article/common.css
 h1 {
    color: red;
 }
 

2. Update the propose.json File

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

/propose.json
 {
  "css": {
    "common": {
      "/article": ["/article/common.css"]
     }
   }
 }  
 

Note

  • CSS common data will execute on the particular directory mentioned in /propose.json.
  • CSS common data will execute if the directory matches with the mentioned directory in /propose.json. If the previous directory and the recent directory are the same, then CSS common data will not reexecute. CSS common data will execute on load and state change events.

Footer