I'm building a site with a lot of similar css between pages. I've decided that a good approach would be to have the css generated as strings by php functions (with parameters) and outputed as an internal stylesheet in every page that i serve. The benefits:
- this way if i make a change it will reflect throughout the entire site without having to maintain duplicates
- i can send only the necessary css for a certain page
- it's better than having small css files and sending a lot of css headers at inclusion
- the possibility that the content might be displayed before the stylesheet is loaded is gone
- i can calculate dimensions by using parameters
- i can create a layer that will minify the result received from these functions or serve cached minified css
I haven't seen this done anywhere else unfortunately so i'm thinking that this might be because of SEO. The generated internal stylesheet will be at around 15kb max (before minifying the stylesheet).
I need your opinion on this approach and your thoughts about the impact a long internal stylesheet will have on SEO.
Many thanks.