CSS is just a text format,so can read and write in stander way.
If you are not taking about how a web-framework read a CSS file?
style.css
If you are not taking about how a web-framework read a CSS file?
style.css
Output:body {
background: #67B26F;
}
html {
height: 100%
}
#wrapper {
width: auto;
}
with open('style.css') as f: css_file = f.read() new = css_file.replace('html', 'rubberduck') with open('new.css', 'w') as f_out: f_out.write(new)new.css
Output:body {
background: #67B26F;
}
rubberduck {
height: 100%
}
#wrapper {
width: auto;
}