Is there a way to modify the font, font color, and font size of an HTML page? I have successfully converted the CSS file into a string by using String(contentsOfFile). Is it possible to use regular expressions or something similar to make changes to the CSS data? Below is an excerpt from the CSS file:
.calibre {
color: #000;
display: block;
font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
font-size: 1em;
margin-bottom: 0;
margin-left: 5pt;
margin-right: 5pt;
margin-top: 0;
padding-left: 0;
padding-right: 0;
text-align: justify
}
I have also attempted to convert this CSS file string into a dictionary using ESCssParser. However, when I convert that dictionary (after adjusting the font size) back into a string, the formatting is altered. For example, #idSelector would become "# idSelector". I am concerned that these modifications may impact the CSS file. Is my assumption correct?
Are there any alternative methods I can utilize to modify the CSS file? Thank you!