Skip to content

Commit 2ccdc29

Browse files
committed
[css-sizing-4] Add syntax to specify ratio as fallback, deferring to replaced intrinsic ratio if available. #4951
1 parent 67721c7 commit 2ccdc29

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

css-sizing-4/Overview.bs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ Intrinsic Aspect Ratios: the 'aspect-ratio' property</h3>
178178

179179
<pre class="propdef">
180180
Name: aspect-ratio
181-
Value: auto | <<ratio>>
181+
Value: auto || <<ratio>>
182182
Initial: auto
183183
Inherited: no
184184
Applies to: all elements except <a>inline boxes</a> and internal ruby or table boxes
@@ -216,6 +216,15 @@ Intrinsic Aspect Ratios: the 'aspect-ratio' property</h3>
216216
Size calculations involving <a>preferred aspect ratio</a>
217217
work with the dimensions of the box specified by 'box-sizing'.
218218

219+
<dt><dfn>auto && <<ratio>></dfn>
220+
<dd>
221+
If both ''auto'' and a <<ratio>> are specified together,
222+
the [=preferred aspect ratio=] is the specified ratio
223+
of ''<var>width</var> / <var>height</var>''
224+
unless it is a [=replaced element=] with an [=intrinsic aspect ratio=],
225+
in which case that aspect ratio is used instead.
226+
In all cases, size calculations involving this aspect ratio
227+
work with the [=content box=] dimensions always.
219228
</dl>
220229

221230
Note: If a box has both a 'width' and a 'height'

0 commit comments

Comments
 (0)