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: mediaqueries/Overview.bs
+7-10Lines changed: 7 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ Former Editor: Anne van Kesteren, Mozilla, annevk@annevk.nl
15
15
!Issue Tracking: Inline, and <a href="http://www.w3.org/Style/CSS/Tracker/products/7">http://www.w3.org/Style/CSS/Tracker/products/7</a>
16
16
Abstract: <a>Media Queries</a> allow authors to test and query values or features of the user agent or display device, independent of the document being rendered. They are used in the CSS @media rule to conditionally apply styles to a document, and in various other contexts and languages, such as HTML and Javascript.
17
17
Abstract: Media Queries Level 4 describes the mechanism and syntax of media queries, media types, and media features. It extends and supersedes the features defined in Media Queries Level 3.
<p> A <dfndata-dfn-type=dfndata-noexport="" id=custom-media-query>custom media query<aclass=self-linkhref=#custom-media-query></a></dfn> is defined with the <aclass=cssdata-link-type=maybehref=#at-ruledef-custom-mediatitle=@custom-media>@custom-media</a> rule:
<p> Where <dfnclass=css-codedata-dfn-type=typedata-export="" id=typedef-custom-name><custom-name><aclass=self-linkhref=#typedef-custom-name></a></dfn> is an <adata-link-type=dfnhref=http://dev.w3.org/csswg/css-syntax-3/#identifiertitle=identifier>identifier</a> which starts with two dashes (U+002D HYPHEN-MINUS),
2037
-
like <spanclass=cssdata-link-type=maybetitle=--foo>--foo</span>.
<p> This defines that the <adata-link-type=dfnhref=#custom-media-querytitle="custom media query">custom media query</a> named by the <aclass="production css-code" data-link-type=typetitle="<extension-name>"><extension-name></a> represents the given <aclass="production css-code" data-link-type=typehref=#typedef-media-query-listtitle="<media-query-list>"><media-query-list></a>.
2038
2037
2039
-
<p> This defines that the <adata-link-type=dfnhref=#custom-media-querytitle="custom media query">custom media query</a> named by the <aclass="production css-code" data-link-type=typehref=#typedef-custom-nametitle="<custom-name>"><custom-name></a> represents the given <aclass="production css-code" data-link-type=typehref=#typedef-media-query-listtitle="<media-query-list>"><media-query-list></a>.
2040
-
2041
-
<p> The <aclass="production css-code" data-link-type=typehref=#typedef-custom-nametitle="<custom-name>"><custom-name></a> can then be used in a <adata-link-type=dfnhref=#media-featuretitle="media feature">media feature</a>.
2038
+
<p> The <aclass="production css-code" data-link-type=typetitle="<extension-name>"><extension-name></a> can then be used in a <adata-link-type=dfnhref=#media-featuretitle="media feature">media feature</a>.
2042
2039
It <strong>must</strong> be used in a <adata-link-type=dfnhref=#boolean-contexttitle="boolean context">boolean context</a>;
2043
2040
using them in a normal or <adata-link-type=dfnhref=#range-contexttitle="range context">range context</a> is a syntax error.
2044
2041
The <adata-link-type=dfnhref=#custom-media-querytitle="custom media query">custom media query</a> evaluates to true if the <aclass="production css-code" data-link-type=typehref=#typedef-media-query-listtitle="<media-query-list>"><media-query-list></a> it represents evaluates to true,
<dt><dfnclass=idl-codedata-dfn-for=CSSCustomMediaRuledata-dfn-type=attributedata-export="" id=dom-csscustommediarule-name>name<aclass=self-linkhref=#dom-csscustommediarule-name></a></dfn>, of type <code>DOMString</code>
2102
2099
<dd>
2103
2100
The <aclass=idl-codedata-link-type=attributehref=#dom-csscustommediarule-nametitle=name>name</a> attribute on getting must return a <code>DOMString</code> object
2104
-
that contains the serialization of the <aclass="production css-code" data-link-type=typehref=#typedef-custom-nametitle="<custom-name>"><custom-name></a> defined for the associated rule.
2101
+
that contains the serialization of the <aclass="production css-code" data-link-type=typetitle="<extension-name>"><extension-name></a> defined for the associated rule.
2105
2102
2106
2103
<p> On setting the <aclass=idl-codedata-link-type=attributehref=#dom-csscustommediarule-nametitle=name>name</a> attribute,
<li><adata-link-type=dfnhref=http://dev.w3.org/csswg/css-syntax-3/#parse-a-component-value0title="parse a component value">Parse a component value</a> from the value.
2111
2108
2112
2109
<li>
2113
-
If the returned value is a<aclass="production css-code" data-link-type=typehref=#typedef-custom-nametitle="<custom-name>"><custom-name></a>,
2114
-
replace the associated rule’s name with the <aclass="production css-code" data-link-type=typehref=#typedef-custom-nametitle="<custom-name>"><custom-name></a>'s representation.
2110
+
If the returned value is an<aclass="production css-code" data-link-type=typetitle="<extension-name>"><extension-name></a>,
2111
+
replace the associated rule’s name with the <aclass="production css-code" data-link-type=typetitle="<extension-name>"><extension-name></a>'s representation.
0 commit comments