Am 10.05.2013 14:56 schrieb Philippe Wittenbergh:

Le 10 mai 2013 à 02:46, Nancy Johnson <njohnso...@gmail.com> a écrit :

I have a question in the best practices for style sheet use and
targeting only the styles needed for a specific page.
@import? Less.js? mulitple stylesheets?

As Cristian, I also use <link>. @import was cool to exclude Netscape 4.x in the old days; nowadays it does not seem to be the recommended way anymore (I am not familiar with the reasons, though).

2/ if you have many style rules only used by page C (the size of the main 
stylesheet grows by a _significant_ amount), it might make sense to dump them 
all in one separate stylesheet that is only called by page C. Eventually.

As a rule of thumb, I personnally do the following distinction:
- If I expect that not all users visit a page using the specific styles, I rather link them only from the pages that actually use them. - OTOH, If the styles are used by many or important pages, I usually link them from all pages, or include them in the main stylesheet, so they are kind of preloaded at the moment when they get used.

HTH
Markus

______________________________________________________________________
css-discuss [css-d@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to