Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import condition #7658

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 27 additions & 9 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -1458,8 +1458,8 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
<p>Certain restrictions are intended to support the restrictions made by other
specifications.</p>

<p class="example">For example, requiring that attributes that take media query lists use only
<em>valid</em> media query lists reinforces the importance of following the conformance rules of
<p class="example">For example, requiring that attributes that take import conditions use only
<em>valid</em> import conditions reinforces the importance of following the conformance rules of
that specification.</p>
</dd>
</dl>
Expand Down Expand Up @@ -3278,7 +3278,6 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
</ul>
</dd>


<dt>Media Queries</dt>

<dd>
Expand All @@ -3287,6 +3286,14 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
feature is defined therein. <ref spec=MQ></p>
</dd>

<dt>CSS Import Conditions</dt>

<dd>
<p>Implementations must support CSS import conditions, defined in <cite>CSS Cascade</cite> as the <dfn
data-x-href="https://drafts.csswg.org/css-cascade/#typedef-import-conditions">&lt;import-conditions></dfn>
feature. <ref spec=CSSCASCADE></p>
</dd>


<dt>CSS modules</dt>

Expand Down Expand Up @@ -6532,7 +6539,6 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute

</div>


<h4 id="mq">Media queries</h4>

<p>A string is a <dfn>valid media query list</dfn> if it matches the <code
Expand All @@ -6543,6 +6549,17 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
environment according to the definitions given in <cite>Media Queries</cite>. <ref
spec=MQ></p>

<h4 id="import-conditions">Import Conditions</h4>

<p>A string is a <dfn>valid import condition</dfn> if it matches the <code
data-x="">&lt;import-condition&gt;</code> production of <cite>CSS Cascade and Inheritance</cite>.
<ref spec=CSSCASCADE></p>

<p>A string <dfn>matches the environment</dfn> of the user if it is the empty string, a string
consisting of only <span>ASCII whitespace</span>, or is an import condition that matches the user's
environment according to the definitions given in <cite>CSS Cascade and Inheritance</cite>. <ref
spec=CSSCASCADE></p>




Expand Down Expand Up @@ -13788,8 +13805,8 @@ interface <dfn interface>HTMLLinkElement</dfn> : <span>HTMLElement</span> {
data-x="external resource link">external resource links</span>.</p>

<p>The <dfn element-attr for="link"><code data-x="attr-link-media">media</code></dfn> attribute
says which media the resource applies to. The value must be a <span>valid media query
list</span>.</p>
says which media the resource applies to. The value must be a <span>valid import
condition</span>.</p>

<p>The <dfn for="link" element-attr><code data-x="attr-link-integrity">integrity</code></dfn>
attribute represents the <span data-x="concept-request-integrity-metadata">integrity
Expand Down Expand Up @@ -26862,8 +26879,8 @@ interface <dfn interface>HTMLSourceElement</dfn> : <span>HTMLElement</span> {
the <span>source set</span>, if the <code>source</code> element is selected.</p>

<p>The <dfn element-attr for="source" data-x="attr-source-media"><code>media</code></dfn>
attribute may also be present. If present, the value must contain a <span>valid media query
list</span>. The user agent will skip to the next <code>source</code> element if the value does
attribute may also be present. If present, the value must contain a <span>valid media query list</span>.
The user agent will skip to the next <code>source</code> element if the value does
not <span data-x="matches the environment">match the environment</span>.</p>

<p>The <code>source</code> element supports <span>dimension attributes</span>. The
Expand Down Expand Up @@ -124415,7 +124432,7 @@ interface <dfn interface>External</dfn> {
<code data-x="attr-source-media">source</code> (in <code>picture</code>);
<code data-x="attr-style-media">style</code>
<td> Applicable media
<td> <span>Valid media query list</span>
<td> <span>Valid import condition or media query list</span>
<tr>
<th> <code data-x="">method</code>
<td> <code data-x="attr-fs-method">form</code>
Expand Down Expand Up @@ -127686,6 +127703,7 @@ INSERT INTERFACES HERE
Mike Shaver,
Mikko Rantalainen,
Mingye Wang,
Miriam Suzanne,
Mohamed Zergaoui<!-- Innovimax SARL -->,
Mohammad Al Houssami,
Mohammad Reza Zakerinasab,
Expand Down