Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions css-images-4/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -2011,7 +2011,9 @@ Color Stop “Fixup”</h4>
will result in a 100px red stripe and 200px green stripe,
giving red 1 share and green 2 shares of the 300px remaining
after subtracting blue's 100px from the 400px total.


<img src="images/stripes-example-33-1.png" style="height:1em; width:400px;" alt="example 1">

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe use and SVG instead of a PNG?

Please also avoid the example number in the name and just call it "stripes1", as the example number may change when other examples are added.

And if you want to provide an alternative text ‒ which is probably not needed as the output is already explained above the image ‒ it should provide a proper description of the image (see also https://www.w3.org/WAI/tutorials/images/tips/). So something like that:
"Horizontal line with a total width of 400 pixels showing the output of 'stripes(red 1fr, green 2fr, blue 100px)'. The left-most part is a red stripe of 100 pixels length, followed by a green stripe of 200 pixels, and a blue stripe of 100 pixels.".


On the other hand,
''stripes(red .1fr, green .2fr, blue 100px)''
with a |total width| of ''400px''
Expand All @@ -2022,7 +2024,9 @@ Color Stop “Fixup”</h4>
to obtain only 90px,
which is then distributed in the 1:2 ratio
dictated by the <<flex>> values.


<img src="images/example33-2.png" style="height: 1em; width:400px;" alt="example 2">

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like above, maybe better an SVG than a PNG.

Simply name it "stripes2" to avoid numbering issues when other example images are added.

And if you want it add an alternative text, here's an example description:
"Horizontal line with a total width of 400 pixels showing the output of 'stripes(red .1fr, green .2fr, blue 100px)'. The left-most part is a red stripe of 30 pixels length, followed by a green stripe of 60 pixels, a blue one of 100 pixels and a transparent stripe of 210 pixels.".


(This is similar to how [=flex layout=] deals with small <<flex>> sums on a line,
and ensures smoothly continuous behavior
as the <<flex>> values approach zero.)
Expand Down
Binary file added css-images-4/images/example33-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added css-images-4/images/stripes-example-33-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.