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? > > Example: > There are : > 3 themed pages A B C, > Two image sprites 1 2, > one stylesheet, > > All pages utilize image sprite 1 > page C only utilizes image sprite 2 > > With one stylesheet, Image sprite 2 is being called on page A B and C > even though the image is only displayed on page C 1/ images referenced by a stylesheet that are _not_ used by a particular page will not be downloaded. IOW, if no element on your page A or B use your image sprite 2, it will not be loaded. So that is a non issue. 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. Philippe -- Philippe Wittenbergh http://l-c-n.com ______________________________________________________________________ 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/