I'm currently developing a C# application that needs to manipulate CSS files. Imagine you have the following CSS code snippet:
.ClassOne
{
color: #FFFFFF;
font-weight:normal;
font-size: 9pt;
font-family: Tahoma;
vertical-align: middle;
border: solid 1px #7F7F7F;
padding: 1px 1px 1px 1px;
background-color: #B48410;
background-position: center center;
}
.ClassTwo
{
color: #FFFFFF;
background-repeat: repeat-x;
background-color: #000000;
}
.ClassThree
{
color: #000000;
font-weight:normal;
font-size: 9pt;
font-family: Tahoma;
vertical-align: left;
border: solid 1px #F3Dc51;
padding: 1px 1px 1px 1px;
background-color: #A32DF1;
}
My goal is to search for specific classes in the file, such as ClassOne, and extract the corresponding background-color property for those classes. This task only needs to be done for certain classes in the CSS file - for example, I may only want to extract the background-color values for ClassOne and ClassThree.
The resulting application should then transfer these stored values to another CSS file with the same set of classes.
I am aware of ExCSS but unsure about its utility in this context and how to effectively leverage it. Can someone provide guidance on this matter?