How to optimize a string to a constant in an existing project (the string appears multiple times in css, js)

A color value is written in many places in the js/css file of the project, and the color value must be uniform, so when we need to change this color value, we have to change it everywhere. Is there any way to set it uniformly?
Note: we only use traditional css, instead of precompilable css such as scss.

Mar.18,2021

for traditional projects, there is usually a common style file that is imported first. You can set up a class to put colors

.
  
  1. in fact, this is an opportunity to adopt scss. Traditional css does not conflict with the adoption of scss.
  2. performs document replacement output.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e3f676-44831.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e3f676-44831.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?