iron-flex-layout icon indicating copy to clipboard operation
iron-flex-layout copied to clipboard

Add mixin for align-items:stretch

Open lesliana opened this issue 9 years ago • 7 comments

There are mixins for all the other align-items values (flex-start, flex-end, center, baseline), but it doesn't look like there's a mixin for align-items:stretch yet.

lesliana avatar Jun 06 '16 23:06 lesliana

align-items: stretch is the default, I believe, which is why it didn't get a separate mixin.

notwaldorf avatar Jun 06 '16 23:06 notwaldorf

This would still be valuable to explicitly set even if it is default, right?

zhaoz avatar Jun 06 '16 23:06 zhaoz

I realize I don't actually need a mixin for align-items:stretch where I thought I did. There is still a chance it could still be useful for elements that need to override another styling.

2016-06-06 16:50 GMT-07:00 zhaoz [email protected]:

This would still be valuable to explicitly set even if it is default, right?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/PolymerElements/iron-flex-layout/issues/96#issuecomment-224122938, or mute the thread https://github.com/notifications/unsubscribe/ABGfmRR6KU2cJMV9syq_PfCAz4OXxI8vks5qJLJEgaJpZM4IvbKi .

lesliana avatar Jun 07 '16 00:06 lesliana

align-items: stretch would be useful in a mobile first approach, where a media-queries would reset the cross-axis behavior to stretch:

/* for mobile a vertical setup centered along the cross-axis (horizontally)*/
.section {
  @apply(--layout-vertical);
  @apply(--layout-center);
}

@media (min-width: 960px) {
  .section {
    @apply(--layout-horizontal);
    @apply(--layout-around-justified);
    /* here we need to stretch */ 
  }
}

timeu avatar Sep 01 '16 18:09 timeu

If anyone wants to send a PR for this, it would be greatly appreciated! 🙏

notwaldorf avatar Sep 06 '16 21:09 notwaldorf

Which is preferred, PRs against master branch, or the 2.0-preview ?

caranicas avatar Nov 29 '16 15:11 caranicas

@caranicas against master, please.

notwaldorf avatar Dec 05 '16 19:12 notwaldorf