Adaptive Images Twitter Bootstrap Ready#125
Open
kollinger wants to merge 2 commits intoMattWilcox:masterfrom
Open
Adaptive Images Twitter Bootstrap Ready#125kollinger wants to merge 2 commits intoMattWilcox:masterfrom
kollinger wants to merge 2 commits intoMattWilcox:masterfrom
Conversation
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.
If you are using a grid system like Twitter Bootstrap, it could be, that the biggest resolution do not affort the biggest images.
Because on a special width the layout will starting to get single-column and the columns possibly get expanded.
Therefore I implemented 2 new arrays for the grid column widths and the grid gutter widths.
The keys of these 2 arrays and the resolutions array are depending on each other.
Column and gutter width came from: http://twitter.github.io/bootstrap/scaffolding.html#responsive
Compare the table there with the 3 mentioned arrays and you will finally understand... ;)
The 5000 in $resolutions is for 1200px and above.
You can modify the 3 mentioned arrays to adapt to any other grid system you like.
How to use with Twitter Bootstrap:
All relevant images have to be in folders named by their bootstrap span-size-classes. E.g. /img/span8/image.jpg
Everything else is the same as in previous Adaptive-Images versions.