Allow breakpoints based on viewport or window#40
Closed
andr3 wants to merge 1 commit intodinbror:masterfrom
Closed
Allow breakpoints based on viewport or window#40andr3 wants to merge 1 commit intodinbror:masterfrom
andr3 wants to merge 1 commit intodinbror:masterfrom
Conversation
1b7b229 to
02703f4
Compare
Author
|
@dinbror...? Any feedback? |
Owner
|
@andr3pt: I like the idea. Only concern is that bLazy doesn't update an image on resize so if your browser window is something small when you open it, it'll load the small image and it'll be up-scaled if you resize the browser window to something bigger. |
02703f4 to
ff1242c
Compare
Author
This file contains hidden or 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
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.
Summary: Even though the documentation mentions widths are provided as
max-width, in reality, they are (using the same property as media-queries)max-device-width.It is reasonable for authors to need to specify breakpoints in terms of viewport.
To offer backwards compatibility, I added an optional parameter for the breakpoints:
mode:'window'(default) orviewportTested with these breakpoints configuration: