HTML and CSS Reference
In-Depth Information
contents of the url keyword, enclosed in parentheses, with a trailing
semicolon. The URL may be absolute or relative to the document's base
URL.
The @import at-rule must appear before any conventional style rules,
either in the <style> tag or in an external stylesheet. Otherwise, the
standard insists that the browser ignore the errant @import . By first im-
porting all the various stylesheets, then processing document-level style
rules, the CSS2 standard cascades: the last one standing wins. [ URL
property values, 8.4.1.4 ]
The @import at-rule can appear in a document-level style definition
or even in another external stylesheet, letting you create nested
stylesheets.
8.1.5. Media-Specific Styles
Besides the media attribute for the <style> tag, the CSS2 standard has
two other features that let you apply different stylesheets, depending on
the agent or device that renders your document. This way, for instance,
you can have one style or whole stylesheet take effect when your docu-
ment gets rendered on a computer screen and another set of styles for
when the contents get punched out on a Braille printer. And what about
those cell phones that access the Web?
Like the media attribute for the <style> tag that affects the entire
stylesheet, you can specify whether the user's document processor
loads and uses an imported stylesheet. Do that by adding a media-type
keyword or a series of comma-separated keywords to the end of the
@import at-rule. For instance, the following example lets the user agent
decide whether to import and use the speech-synthesis stylesheet or a
common PC display and print stylesheet, if it is able to render the spe-
cified media types:
@import url(http://www.kumquats.com/styles/visual_styles.css) screen,print;
@import "http://www.kumquats.com/styles/speech_styles.css" aural;
 
Search WWH ::




Custom Search