Skip to content

Commit 97c8e46

Browse files
committed
Buncha edits.
1 parent 354427c commit 97c8e46

File tree

1 file changed

+37
-24
lines changed

1 file changed

+37
-24
lines changed

UseCaseComparisons.md

Lines changed: 37 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ Assuming three image “breakpoints” intended to remain in sync with a media-q
3333
```
3434

3535
**Extended `srcset`**
36-
N/A
36+
*N/A*
3737

3838

39-
### Using relative units ###
39+
### Relative units ###
4040
Assuming three image “breakpoints” intended to remain in sync with a media-query-based layout specced in `em` units.
4141

4242
**`picture` Element**
@@ -50,7 +50,7 @@ Assuming three image “breakpoints” intended to remain in sync with a media-q
5050
```
5151

5252
**Extended `srcset`**
53-
N/A
53+
*N/A*
5454

5555
Note: the `em` values above could be manually converted to `px` by the author to ensure that the image breakpoints are within a few pixels of the `em`-based layout media queries, resulting in:
5656

@@ -60,10 +60,11 @@ Note: the `em` values above could be manually converted to `px` by the author to
6060

6161
While the `em`-based CSS layout will be reevaulated based on user zoom in all modern browsers (see http://blog.cloudfour.com/the-ems-have-it-proportional-media-queries-ftw/ for a description and functional example) and we can assume the same for the `em`-based image breakpoints, the `px`-based image breakpoints will fall out of sync with the layout when the user zooms in or out.
6262

63-
## Portait vs. Landscape Orientation ##
64-
[]
63+
## Portait vs. Landscape Orientation ## ##
6564

6665
**`picture` Element**
66+
Assuming the author simply wants to preform image source swapping based on a device’s orientation. This would likely see use in a standalone mobile site catering to specific devices or in a combination web/native app.
67+
6768
```
6869
<picture>
6970
<source media="device-orientation: portrait" src="image1.jpg">
@@ -73,21 +74,12 @@ While the `em`-based CSS layout will be reevaulated based on user zoom in all mo
7374
```
7475

7576
**Extended `srcset`**
76-
N/A
77+
*N/A*
7778

7879

7980
## Display Density
8081
The two proposals are functionally identical in terms of dealing with display density when independent of the “Viewport Sizes” use case:
8182

82-
**`picture` Element**
83-
```
84-
<picture>
85-
<source srcset="image1.jpg, image2.jpg 2x">
86-
<img src="image1.jpg" alt="">
87-
</picture>
88-
```
89-
90-
**Extended `srcset`**
9183
```
9284
<img src="image1.jpg" srcset="image2.jpg 2x">
9385
```
@@ -126,7 +118,8 @@ Assuming two image sources indended for display on screen depending on window si
126118
```
127119

128120
**Extended `srcset`**
129-
N/A
121+
*N/A*
122+
130123

131124
## Color saturation/high-contrast mode
132125
This is based on the high-contrast mode and ambient light media queries currently being proposed in the CSS WG.
@@ -141,26 +134,46 @@ This is based on the high-contrast mode and ambient light media queries currentl
141134
```
142135

143136
**Extended `srcset`**
144-
N/A
137+
*N/A*
145138

146139

147-
## Potential for addressing bandwidth concerns
140+
## Potential for addressing bandwidth concerns ##
141+
[[ TODO: `srcset` as suggestion overrideable by UA, in both cases. Seperation of concerns (“art direction” vs. density cases) may make this simpler with `picture`, see writeup in http://www.w3.org/community/respimg/2012/06/18/florians-compromise/ ]]
148142

149143

150-
## Potential for future accessibility improvements
144+
## Potential for future accessibility improvements ##
151145

146+
Both patterns are functionally identical in terms of _short_ descriptive text, though authoring differs. The `picture` pattern will allow fallback content to serve as the content exposed to assistive technologies (in this case, the fallback `img` alt tag would be used), while the extended `srcset` syntax would rely on the `img` element’s `alt` attribute.
152147

153-
## Potential for addressing new image formats
148+
**`picture` Element**
149+
```
150+
<picture>
151+
[ … ]
152+
<img src="image1.jpg" alt="Short descriptive text.">
153+
</picture>
154+
```
155+
156+
**Extended `srcset`**
157+
```
158+
<img src="image1.jpg" srcset="[…]" alt="Short descriptive text.">
159+
```
160+
161+
Further discussion: <a href="http://lists.w3.org/Archives/Public/public-html/2012Sep/0029.html">http://lists.w3.org/Archives/Public/public-html/2012Sep/0029.html</a>
162+
163+
164+
## Potential for addressing new image formats ##
165+
[[ TODO: Summary ]]
154166

155167
**`picture` Element**
156168
```
157169
<picture>
158-
<source src="image2.webp" type="image/webp">
159-
<source src="image1.jpg">
160-
<img src="image1.jpg" alt="">
170+
<source src="image1.webp" type="image/webp">
171+
<source src="image2.jpg" media="min-width: 20em">
172+
<source src="image3.jpg" media="min-width: 40em">
173+
<img src="image2.jpg" alt="">
161174
</picture>
162175
```
163176

164177
**Extended `srcset`**
165-
N/A
178+
*N/A*
166179

0 commit comments

Comments
 (0)