Skip to content

Commit 21cf976

Browse files
committed
[css-easing-2] Avoid image layout shift
1 parent 27a930e commit 21cf976

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

css-easing-2/Overview.bs

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ Repository: w3c/csswg-drafts
4242
</pre>
4343

4444
<style>
45+
.easing-graph {
46+
max-width: 400px;
47+
width: 100%;
48+
}
4549
@media (prefers-color-scheme: dark) {
4650
.easing-graph {
4751
background: none;
@@ -72,7 +76,7 @@ input progress value and producing a corresponding transformed output progress
7276
value.
7377

7478
<figure>
75-
<img class="easing-graph" src="easing-function-example.svg" width="400"
79+
<img class="easing-graph" src="easing-function-example.svg" width="535" height="510"
7680
alt="Example of an easing function that produces an ease-in effect.">
7781
<figcaption>
7882
Example of an easing function that produces an ease-in effect.<br>
@@ -330,7 +334,7 @@ It returns an [=output progress value=].
330334
that moves linearly from 0, to 0.25, then to 1:
331335

332336
<figure>
333-
<img class="easing-graph" src="simple-linear-example.svg" width="400"
337+
<img class="easing-graph" src="simple-linear-example.svg" width="535" height="510"
334338
alt="linear(0, 0.25, 1) plotted on a graph">
335339
</figure>
336340
</div>
@@ -343,7 +347,7 @@ It returns an [=output progress value=].
343347
then the last 25% transitioning from ''.25'' to ''1'':
344348

345349
<figure>
346-
<img class="easing-graph" src="linear-with-input-example.svg" width="400"
350+
<img class="easing-graph" src="linear-with-input-example.svg" width="535" height="510"
347351
alt="linear(0, 0.25 75%, 1) plotted on a graph.
348352
The graph has three points.
349353
The first is at 0,0.
@@ -360,7 +364,7 @@ It returns an [=output progress value=].
360364
producing the following easing function:
361365

362366
<figure>
363-
<img class="easing-graph" src="linear-with-double-input-example.svg" width="400"
367+
<img class="easing-graph" src="linear-with-double-input-example.svg" width="535" height="510"
364368
alt="linear(0, 0.25 75%, 1) plotted on a graph.
365369
The graph has four points.
366370
The first is at 0,0.
@@ -376,7 +380,7 @@ It returns an [=output progress value=].
376380
For example, here are the implicit values from the previous function:
377381

378382
<figure>
379-
<img class="easing-graph" src="linear-with-double-input-example-continued.svg" width="400"
383+
<img class="easing-graph" src="linear-with-double-input-example-continued.svg" width="535" height="510"
380384
alt="linear(0, 0.25 75%, 1) plotted on a graph.
381385
The graph has four points.
382386
The first is at 0,0.
@@ -414,7 +418,7 @@ It returns an [=output progress value=].
414418
so inputs greater than 1 always output 1.
415419

416420
<figure>
417-
<img class="easing-graph" src="linear-bounce-example.svg" width="400"
421+
<img class="easing-graph" src="linear-bounce-example.svg" width="535" height="510"
418422
alt="The graph of a rough bounce easing.">
419423
</figure>
420424

@@ -461,7 +465,7 @@ The <var>x</var> coordinates of <var>P1</var> and <var>P2</var>
461465
are restricted to the range [0, 1].
462466

463467
<figure>
464-
<img class="easing-graph" src="cubic-bezier-easing-curve.svg" width="400"
468+
<img class="easing-graph" src="cubic-bezier-easing-curve.svg" width="535" height="510"
465469
alt="A cubic Bezier curve used as an easing function.">
466470
<figcaption>
467471
A cubic B&eacute;zier curve used as an easing function.<br>

0 commit comments

Comments
 (0)