Skip to content

Commit ac8f983

Browse files
musgravejwyutakahirano
authored andcommitted
Allow mathematical expressions in <img sizes>
Tests: web-platform-tests/wpt#10167. Fixes whatwg#3003.
1 parent 65b6e70 commit ac8f983

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

source

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3756,7 +3756,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
37563756
<li>The <dfn data-x-href="https://drafts.csswg.org/css-values/#in">'in'</dfn> unit</li>
37573757
<li>The <dfn data-x-href="https://drafts.csswg.org/css-values/#px">'px'</dfn> unit</li>
37583758
<li>The <dfn data-x-href="https://drafts.csswg.org/css-values/#funcdef-attr">'attr()'</dfn> function</li>
3759-
<li>The <dfn data-x-href="https://drafts.csswg.org/css-values/#funcdef-calc">'calc()'</dfn> function</li>
3759+
<li>The <dfn data-x-href="https://drafts.csswg.org/css-values/#math-function">math functions</dfn></li>
37603760
</ul>
37613761

37623762
<p>The term <dfn data-x="css-styling-attribute"
@@ -27058,7 +27058,7 @@ was an English &lt;a href="/wiki/Music_hall">music hall&lt;/a> singer, ...</pre>
2705827058
<dfn>&lt;source-size-value></dfn> = <span>&lt;length></span></pre>
2705927059

2706027060
<p>A <span>&lt;source-size-value></span> must not be negative, and must not use CSS functions
27061-
other than the <span>'calc()'</span> function.</p>
27061+
other than the <span>math functions</span>.</p>
2706227062

2706327063
<p>The <span>&lt;source-size-value></span> gives the intended layout width of the image. The
2706427064
author can specify different widths for different environments with
@@ -28234,7 +28234,7 @@ was an English &lt;a href="/wiki/Music_hall">music hall&lt;/a> singer, ...</pre>
2823428234
is a valid non-negative <span>&lt;source-size-value></span>,
2823528235
let <var>size</var> be its value
2823628236
and remove the <span>component value</span> from <var>unparsed size</var>.
28237-
Any CSS function other than the <span>'calc()'</span> function is invalid.
28237+
Any CSS function other than the <span>math functions</span> is invalid.
2823828238
Otherwise, there is a <span data-x="concept-microsyntax-parse-error">parse error</span>;
2823928239
continue to the next iteration of this algorithm.</p></li>
2824028240

0 commit comments

Comments
 (0)