You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: css3-cascade/Overview.src.html
+32Lines changed: 32 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -123,11 +123,43 @@ <h2 id="at-import">
123
123
The full syntax of the expressions after the URL
124
124
is defined by the Media Queries specification [[!MEDIAQ]].
125
125
126
+
<h3id='import-content-type'>
127
+
Content-Type of imported stylesheets</h3>
128
+
126
129
<p>
127
130
In the absence of any media queries,
128
131
the import is unconditional.
129
132
Specifying ''all'' for the medium has the same effect.
130
133
134
+
<p>
135
+
The processing of imported stylesheets depends on the actual type of the linked resource.
136
+
If the resource does not have <ahref="http://www.whatwg.org/specs/web-apps/current-work/multipage/fetching-resources.html#content-type">Content-Type metadata</a>,
137
+
or the host document is in <ahref="http://www.whatwg.org/specs/web-apps/current-work/multipage/infrastructure.html#quirks-mode">quirks mode</a>
138
+
and has the <ahref="http://www.whatwg.org/specs/web-apps/current-work/multipage/origin-0.html#same-origin"> sameorigin</a> as the imported stylesheet,
139
+
the type of the linked resource is <code>text/css</code>.
140
+
Otherwise, the type is determined from its <ahref="http://www.whatwg.org/specs/web-apps/current-work/multipage/fetching-resources.html#content-type">Content-Type metadata</a>.
141
+
142
+
<p>
143
+
If the linked resource's type is <code>text/css</code>,
144
+
it must be interpreted as a CSS stylesheet.
145
+
Otherwise, if the resource's type denotes a type of stylesheet that the user agent understands,
146
+
it must be interpreted as defined by that type.
147
+
Otherwise, the resource must not be interpreted as a stylesheet.
148
+
149
+
150
+
151
+
The stylesheet keyword may be used with link elements. This keyword creates an external resource link that contributes to the styling processing model.
152
+
153
+
The specified resource is a resource that describes how to present the document. Exactly how the resource is to be processed depends on the actual type of the resource.
154
+
155
+
If the alternate keyword is also specified on the link element, then the link is an alternative stylesheet; in this case, the title attribute must be specified on the link element, with a non-empty value.
156
+
157
+
The default type for resources given by the stylesheet keyword is text/css.
158
+
159
+
The appropriate time to obtain the resource is when the external resource link is created or when its element is inserted into a document, whichever happens last. If the resource is an alternative stylesheet then the user agent may defer obtaining the resource until it is part of the preferred style sheet set. [CSSOM]
160
+
161
+
Quirk: If the document has been set to quirks mode, has the same origin as the URL of the external resource, and the Content-Type metadata of the external resource is not a supported style sheet type, the user agent must instead assume it to be text/css.
0 commit comments