There is a source.css css file in which there are selectors containing the .adapt-1 css-class. Is there a ready-made solution, how to cut all these selectors and place them in another file? It is necessary not to break the other selectors that are present in the file.

Source code

 .three-columns .toolbar .view-mode, .adapt-1 .toolbar .view-mode, .adapt-2 .two-columns-right .toolbar .view-mode, .adapt-2 .two-columns-left .toolbar .view-mode, .adapt-1 .one-column .toolbar .view-mode { float: right; margin-right: 21px; } .adapt-1 .toolbar { display: block; } 

results

source.css :

 .three-columns .toolbar .view-mode, .adapt-2 .two-columns-right .toolbar .view-mode, .adapt-2 .two-columns-left .toolbar .view-mode { float: right; margin-right: 21px; } 

adapt-1.css

 .adapt-1 .toolbar .view-mode, .adapt-1 .one-column .toolbar .view-mode { float: right; margin-right: 21px; } .adapt-1 .toolbar { display: block; } 
  • Well, if you can do a regular season, but it’s somehow completely wild. need full syntax analysis. Is this an ongoing task? If a one-time - then his hands at times easier than software. - Mike
  • The task is one-time, but in this way it is necessary to cut out three classes. I already cut out .adapt-0 with my hands and spent 4 hours on it: (I thought there was a solution, otherwise the source file is quite large. Not necessarily regular. Maybe some script (preferably in php). - danil
  • Well, I mean that from scratch a prog is too difficult to do. Maybe what editors and development environments are there that can. Maybe some designers will notice the question and help - Mike
  • @danil, wow, 4 hours. How many selectors with adapt-0 were there interesting? - dzhioev
  • @dzhioev, I didn’t count right away, so not many ... 500 pieces, probably, you just need to carefully cut them out so that other selectors don’t disappear, and the work is tedious: / - danil

0