Skip to content

Commit f17bad2

Browse files
committed
Split the 'replaced element' section into three pieces with specified and default object sizes set appropriately. Reword 'object-fit' to just specify the specified size.
--HG-- extra : rebase_source : c3be654da2da254eb13c9af57c4c6ca6ac2b3d8e
1 parent 5f1df27 commit f17bad2

2 files changed

Lines changed: 42 additions & 58 deletions

File tree

css3-images/Overview.html

Lines changed: 29 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1975,15 +1975,32 @@ <h4 id=specified-and-default-sizes><span class=secno>5.1.1. </span>
19751975
typical cursor on the UA's operating system. <a href="#CSS21"
19761976
rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a>
19771977

1978+
<dt>&lsquo;<code class=property>content</code>&rsquo; (non-replaced)
1979+
1980+
<dd>The <a href="#specified-size"><i>specified size</i></a> has no
1981+
constraints. The <a href="#default-object-size"><i>default object
1982+
size</i></a> is the largest rectangle that has a 2:1 width:height ratio,
1983+
is no larger than 300px width and 150px height, and has a width that fits
1984+
in the device. <a href="#CSS21"
1985+
rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a>.
1986+
19781987
<dt>replaced elements
19791988

1989+
<dd>Replaced elements are not sized by the <a
1990+
href="#default-sizing-algorithm"><i>default sizing algorithm</i></a>.
1991+
Instead, CSS 2.1 defines how to size them in sections <a
1992+
href="http://www.w3.org/TR/CSS2/visudet.html#min-max-widths">10.4</a> and
1993+
<a
1994+
href="http://www.w3.org/TR/CSS2/visudet.html#min-max-heights">10.7</a>.
1995+
<a href="#CSS21" rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a>
1996+
1997+
<dt>contents of replaced elements
1998+
19801999
<dd>The <a href="#specified-size"><i>specified size</i></a> is defined by
19812000
&lsquo;<a href="#object-fit0"><code
19822001
class=property>object-fit</code></a>&rsquo;. The <a
1983-
href="#default-object-size"><i>default object size</i></a> is the largest
1984-
rectangle that has a 2:1 width:height ratio, is no larger than 300px
1985-
width and 150px height, and has a width that fits in the device. <a
1986-
href="#CSS21" rel=biblioentry>[CSS21]<!--{{!CSS21}}--></a>.
2002+
href="#default-object-size"><i>default object size</i></a> is the used
2003+
width and height of the replaced element.
19872004
</dl>
19882005
<!-- ====================================================================== -->
19892006

@@ -2188,20 +2205,13 @@ <h3 id=object-fit><span class=secno>5.4. </span> Sizing Objects: the
21882205
<p>If the replaced element's content does not have an <i>intrinsic aspect
21892206
ratio</i>, all of the values for &lsquo;<a href="#object-fit0"><code
21902207
class=property>object-fit</code></a>&rsquo; are treated as &lsquo;<code
2191-
class=css>fill</code>&rsquo;. Otherwise, the object is scaled as follows:
2208+
class=css>fill</code>&rsquo;.
21922209

21932210
<dl>
21942211
<dt>&lsquo;<code class=css>fill</code>&rsquo;
21952212

2196-
<dd>
2197-
<p>Set the object's size to the <a
2198-
href="#concrete-object-size"><i>concrete object size</i></a> obtained by
2199-
running the <a href="#default-sizing">object sizing algorithm</a> with a
2200-
<a href="#specified-size"><i>specified size</i></a> and a <a
2201-
href="#default-object-size"><i>default object size</i></a> equal to the
2202-
replaced element's used width and height.</p>
2203-
2204-
<p>This will allow the object to fill the replaced element's content box.</p>
2213+
<dd>The object's <a href="#specified-size"><i>specified size</i></a> is
2214+
the element's used width and height.
22052215

22062216
<dt>&lsquo;<code class=css>contain</code>&rsquo;
22072217

@@ -2219,11 +2229,8 @@ <h3 id=object-fit><span class=secno>5.4. </span> Sizing Objects: the
22192229
the contents. This will proportionally scale the used width and height
22202230
up to the given maximum constraints.</p>
22212231

2222-
<p>Set the <a href="#concrete-object-size"><i>concrete object
2223-
size</i></a> to the largest width and height that has the same aspect
2224-
ratio as the object's intrinsic aspect ratio, and additionally has
2225-
neither width nor height larger than the replaced element's used width
2226-
and height, respectively.</p>
2232+
<p>The object's <a href="#specified-size"><i>specified size</i></a> is a
2233+
"contain" constraint.</p>
22272234

22282235
<dt>&lsquo;<code class=css>cover</code>&rsquo;
22292236

@@ -2241,21 +2248,12 @@ <h3 id=object-fit><span class=secno>5.4. </span> Sizing Objects: the
22412248
the contents. This will proportionally scale the used width and height
22422249
down to the given minimum constraints.</p>
22432250

2244-
<p>Set the <a href="#concrete-object-size"><i>concrete object
2245-
size</i></a> to the smallest width and height that has the same aspect
2246-
ratio as the object's intrinsic aspect ratio, and additionally has
2247-
neither width nor height smaller than the replaced element's used width
2248-
and height, respectively.</p>
2251+
<p>The object's <a href="#specified-size"><i>specified size</i></a> is a
2252+
"cover" constraint.</p>
22492253

22502254
<dt>&lsquo;<code class=css>none</code>&rsquo;
22512255

2252-
<dd>
2253-
<p>Set the content's size to the <a
2254-
href="#concrete-object-size"><i>concrete object size</i></a> obtained by
2255-
running the <a href="#default-sizing">object sizing algorithm</a> with
2256-
no <a href="#specified-size"><i>specified size</i></a>, and a <a
2257-
href="#default-object-size"><i>default object size</i></a> equal to the
2258-
replaced element's used width and height.</p>
2256+
<dd>The object has no <a href="#specified-size"><i>specified size</i></a>.
22592257

22602258
<dt>&lsquo;<code class=css>scale-down</code>&rsquo;
22612259

css3-images/Overview.src.html

Lines changed: 13 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1123,8 +1123,14 @@ <h4 id='specified-and-default-sizes'>
11231123
<dt>'cursor'</dt>
11241124
<dd>The <i>specified size</i> has no constraints. The <i>default object size</i> is a UA-defined size that should be based on the size of a typical cursor on the UA's operating system. [[!CSS21]]</dd>
11251125

1126+
<dt>'content' (non-replaced)</dt>
1127+
<dd>The <i>specified size</i> has no constraints. The <i>default object size</i> is the largest rectangle that has a 2:1 width:height ratio, is no larger than 300px width and 150px height, and has a width that fits in the device. [[!CSS21]].</dd>
1128+
11261129
<dt>replaced elements</dt>
1127-
<dd>The <i>specified size</i> is defined by 'object-fit'. The <i>default object size</i> is the largest rectangle that has a 2:1 width:height ratio, is no larger than 300px width and 150px height, and has a width that fits in the device. [[!CSS21]].</dd>
1130+
<dd>Replaced elements are not sized by the <i>default sizing algorithm</i>. Instead, CSS 2.1 defines how to size them in sections <a href="http://www.w3.org/TR/CSS2/visudet.html#min-max-widths">10.4</a> and <a href="http://www.w3.org/TR/CSS2/visudet.html#min-max-heights">10.7</a>. [[!CSS21]]</dd>
1131+
1132+
<dt>contents of replaced elements</dt>
1133+
<dd>The <i>specified size</i> is defined by 'object-fit'. The <i>default object size</i> is the used width and height of the replaced element.</dd>
11281134
</dl>
11291135

11301136
<!-- ====================================================================== -->
@@ -1242,20 +1248,11 @@ <h3 id="object-fit">
12421248
<p>Not all replaced elements can be scaled, but images typically can.</p>
12431249

12441250
<p>If the replaced element's content does not have an <i>intrinsic aspect
1245-
ratio</i>, all of the values for 'object-fit' are treated as ''fill''.
1246-
Otherwise, the object is scaled as follows:</p>
1251+
ratio</i>, all of the values for 'object-fit' are treated as ''fill''.</p>
12471252

12481253
<dl>
12491254
<dt>''fill''</dt>
1250-
<dd>
1251-
<p>Set the object's size to the <i>concrete object size</i> obtained
1252-
by running the <a href="#default-sizing">object sizing algorithm</a> with
1253-
a <i>specified size</i> and a <i>default object size</i> equal to the
1254-
replaced element's used width and height.</p>
1255-
1256-
<p>This will allow the object to fill the replaced element's
1257-
content box.</p>
1258-
</dd>
1255+
<dd>The object's <i>specified size</i> is the element's used width and height.</dd>
12591256

12601257
<dt>''contain''</dt>
12611258
<dd>
@@ -1267,10 +1264,7 @@ <h3 id="object-fit">
12671264
is the actual intrinsic ratio of the contents. This will proportionally
12681265
scale the used width and height up to the given maximum constraints.</p>
12691266

1270-
<p>Set the <i>concrete object size</i> to the largest width and height
1271-
that has the same aspect ratio as the object's intrinsic aspect ratio,
1272-
and additionally has neither width nor height larger than the replaced
1273-
element's used width and height, respectively.</p>
1267+
<p>The object's <i>specified size</i> is a "contain" constraint.</p>
12741268
</dd>
12751269

12761270
<dt>''cover''</dt>
@@ -1282,20 +1276,12 @@ <h3 id="object-fit">
12821276
dimensions of the contents were infinitely small numbers whose ratio
12831277
is the actual intrinsic ratio of the contents. This will proportionally
12841278
scale the used width and height down to the given minimum constraints.</p>
1285-
1286-
<p>Set the <i>concrete object size</i> to the smallest width and height
1287-
that has the same aspect ratio as the object's intrinsic aspect ratio, and
1288-
additionally has neither width nor height smaller than the replaced
1289-
element's used width and height, respectively.</p>
1279+
1280+
<p>The object's <i>specified size</i> is a "cover" constraint.</p>
12901281
</dd>
12911282

12921283
<dt>''none''</dt>
1293-
<dd>
1294-
<p>Set the content's size to the <i>concrete object size</i> obtained
1295-
by running the <a href='#default-sizing'>object sizing algorithm</a> with
1296-
no <i>specified size</i>, and a <i>default object size</i> equal to
1297-
the replaced element's used width and height.</p>
1298-
</dd>
1284+
<dd>The object has no <i>specified size</i>.</dd>
12991285

13001286
<dt>''scale-down''</dt>
13011287
<dd>

0 commit comments

Comments
 (0)