Closed danielbachhuber closed 8 years ago
@goldenapples #reviewmerge
The concept seems good, but I think there might be some edge cases where dimensions are saved as non-pixel values, or where only one of the dimensions is set as an attribute so we're mixing different units.
I suppose the alternative to this pull request is that we should be adding data-true-width and data-true-height to all elements that include shortcake-bakery-responsive class.
Yeah, I suspect this issue was the original reason behind using those data attributes. We could stand to add much more documentation for this. Might be nice to also add a .load
handler to all .shortcake-bakery-responsive
elements which sets those data attributes based on the element's true dimensions, if they're not already set in the markup.
Continued in #139
Fixes #133