Skip to content

Graphic Euphoria

Combine all CSS media types into one style sheet

I have stumbled across another great CSS tip!
Combine Your CSS Media Styles Into One File
As you are probably already aware you can declare a media type for your CSS stylesheet. This enables you to have a specific style for online, mobile, print etc. Declaring these sheets seperately means you have extra http requests. The more requests per page the less efficient it becomes..

CSS has a built in method of declaring the type as if it were an ‘if’ statement. Hence you can keep all your CSS in the one file! F.A.B.

@media all
{
/* all other attributes (web, mobile etc) */
}
@media print
{
/* print attributes */
}

These might interest you:

trackback to me

No comments yet - add your thoughts?