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

Better responsive img #17

Closed
MarcelHekkert opened this issue Feb 3, 2016 · 1 comment
Closed

Better responsive img #17

MarcelHekkert opened this issue Feb 3, 2016 · 1 comment

Comments

@MarcelHekkert
Copy link

I have just started using reflex. When using a responsive image with just grid__cell-img it always scales up (probably also when used inside a cell!). It can be more flexible to make the upscale an extra class. The classname I have used is just a suggestion.

.@{reflex-prefix}grid__cell-img {
display: block;
.display-flex-only();
.flex(0, 0, auto);
margin-left: 0;
margin-right: 0;
max-width: 100%;
height: auto;

    &.img-full-width{
        width: 100%;
    }
}
@leejordan
Copy link
Owner

My thinking on this is if you want the image treated as a flex item, you use the grid__cell-img class so it fills the available space correctly, otherwise you set up a grid__cell within which you can treat images however you like as they are then out of the flexbox flow.

However maybe this isn't clear, or ideal. I'm open to further discussion and suggestions.

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