fix(curriculum): introduce css max in accessibility-quiz (#50738)

Co-authored-by: Naomi Carrigan <nhcarrigan@gmail.com>
This commit is contained in:
a2937
2023-06-22 08:44:10 -04:00
committed by GitHub
parent d17ce537d9
commit 29e69ed080

View File

@@ -9,7 +9,17 @@ dashedName: step-8
A useful property of an _SVG_ (scalable vector graphics) is that it contains a `path` attribute which allows the image to be scaled without affecting the resolution of the resultant image.
Currently, the `img` is assuming its default size, which is too large. Correctly, scale the image using it's `id` as a selector, and setting the `width` to `max(100px, 18vw)`.
Currently, the `img` is assuming its default size, which is too large. CSS has a `max` function which returns the largest of a set of comma-separated values. For example:
```css
img {
width: max(250px, 25vw);
}
```
In this example, `img` elements will have a minimum width of `250px`. And as the viewport grows, the image will grow accordingly to be 25 percent of the viewport width.
Scale the image using its `id` as a selector, and setting the `width` to to be the maximum of `100px` or `18vw`.
# --hints--