-
Notifications
You must be signed in to change notification settings - Fork 383
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
Improve Element Sizing #103
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Includes extension in the regex. Adds tests.
Existing extractor hook in and return if they get a false. Simplifies the code of the `extract` method and will let others hook and provide their own extractors.
To avoid issues when `false` returned
Only used by img_sanitizer. Move it into the class.
Use querystring params for photon URLs. Use wpcom_getimagesize as a last resort fallback.
We want elements to not grow beyond their width and shrink to fill the screen on viewports smaller than their width. We do this by adding a `sizes` attribute (when not already set) to enforce this behavior. See #101
Add tests for this.
4.4 is the min supported version for the plugin
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Instead of automatically applying
layout=responsive
to allamp
elements, this introduces some changes so we can be a bit smarter about it.It makes images, videos, and iframes more responsive using the
sizes
attribute. If an element is less than the max width of the page container, it will not grow beyond its defined width. When the viewport is smaller than the element's defined width, it will shrink appropriately.See #14
Fixes #71 #101