Home > Enterprise >  Updating to a new CSS file
Updating to a new CSS file

Time:04-08

I am wondering how I can add a border to all elements that a particular CSS file touches without adding it to every class, id, and element in that CSS file.

The idea is that I can take one class from an old CSS file and move it to a new CSS file and then mark it with a border so I know that it has been moved. I remember seeing a YouTube video a few years ago explaining this but I can't find it again.

CodePudding user response:

You could create a style declaration in the new CSS file and append every class you migrate to that file there.

e.g.

/* Will be removed after migration is finished */
.my-style-01,
.my-style-02,
.my-style-03 {
  border: 1px solid red;
}

/* Below you can add all your styles from the old file one after the other */
.my-style-01 {}
/* ... */

This is not an "full automatic" solution but it works for keeping track of what has been migrated.

  •  Tags:  
  • css
  • Related