java - How to get CSS selectors which contain specific colors? -


First of all, sorry I did not put any code here because I did not know how to do this.

What I want is to get all the CSS selectors (in the CSS file), which has a special color ... let's say for example, # 3C3C3C.

Example: Read a CSS file

 . First-selector div {color: # 3C3C3C; } .second-selector span {background-color: # 3C3C3C; }. Thread-selector {limit: 1px solid # 3C3C3C; }. Fourth-selector Nothing {color: # 00000;   Expected Result - Remove it in the array (only with a specific color style)   
  array [0 ] ['Selector'] == "first selector div" array [0] ['style'] == "color" array [1] ['selector'] == ".second-selector span" array [1] [ 'Style'] == "background color" array [2] ['selector'] == "thread-selector" array [2] ['style'] == "border"  
< P> What should be the reason for the selectors to search for specific color and put them in the array?

Note This will be processed on the server side.

Using file concepts, Just type arguments in JS to read the contents of the file, then use some regular expression logic or any other logic such as dividing the content by passing the controller values. Sometimes this is not the right approach, only an idea


Comments