Am 10.11.2013 18:36 schrieb Markus Ernst:
Moving the distinction of viewing situations to the head would have some
advantages IMO:
- Verbosity is centralized, thus has not to be repeated in every <img>
element
- The UA does not need to evaluate the same MQs again for every <img> in
the content
- In order to achieve a consistent handling of "responsivity", the
situation variables may be reused in other content elements, such as
<video>, and also in the <link> element as an alternative to todays
@media attribute
- Easier handling of redesigns when breakpoints change; no modifications
needed in the page content

While writing answers to Yucca's and Tab's messages, I got aware of one more interesting point:

Many websites are maintained by editors who have no deep knowledge of HTML. They use CMS systems that provide more or less intuitive UIs for content editing. Now, every respImg solution that uses MQs inside the <img> element will be quite hard to create an useable UI for. In the image selection dialog, it would need to handle an unknown number of sources with the respective MQs. And the editors will need to consult a manual each time they insert an image, to know the values they have to enter for the MQ.

OTOH, handling a predefined set of viewing situations could be easily implemented in the image picker of a CMS. Once the system knows the situation variables (by parsing the template's head, or configured in the preferences), it can show a dialog that asks for the exact set of required sources.

Reply via email to