Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reponsive images, sizes #113

Open
strarsis opened this issue Apr 19, 2017 · 2 comments
Open

Reponsive images, sizes #113

strarsis opened this issue Apr 19, 2017 · 2 comments

Comments

@strarsis
Copy link

In many cases the tailor grid is used in a responsive (not just adaptive) layout,
the images are scaled relatively to available width.

A proper sizes attribute would allow the browser to pick the right image file,
speed up page loading considerably because this can already happen during HTML parsing -
also this is the correct usage of srcset.

Ideally tailor would allow adding extra information of its outmost width so
it can calculate correct sizes attributes for the element it contains.

@strarsis strarsis changed the title Reponsive images Reponsive images, sizes Apr 19, 2017
@andrew-worsfold
Copy link
Contributor

@strarsis - Are you able to provide more detail about an approach for adding "extra information" that could be used for this purpose?

@strarsis
Copy link
Author

strarsis commented Jun 25, 2017

@andrew-worsfold: The theme has to inform about the main content area, ideally for each viewpoint width/height. The tailor elements have to share this available space. When a tailor element got a fluid width (like 1/3 of the available space), the sizes attribute needs to become calc(<available-width> * 0.3).
Similar issue: WordPress/gutenberg#869

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants