How to make css smaller? -
i have css file styles entire page, , it's getting gzipped , it's minified, it's still 200kb. there else can do?
i took @ @ profile , found www.charliecarver.me, took @ , found css file. if website , css file talking about, repeat lot of statements. example, line 1 13 of css file looks this:
body { /** css code... **/ }
line 15 17 looks this:
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,input,textarea,p,blockquote,th,td { /** css code... **/ }
line 432 434:
html>body #content { /** css code... **/ }
line 826 828:
body,td,th,.metadata a:link,.metadata a:visited,.navigation a:link,.navigation { /** css code... **/ }
all done 1 block of code referencing body. so, reduce amount of repeats have. give idea of what's repeating:
the elements:
- "div" appears 35 times
- "dt" appears 50 times
- "dd" appears 30 times
- "ol" appears 49 times
- "li" appears 6 times
- "yui" appears 315 times
also, using need reduce size.
Comments
Post a Comment