question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Feature request] Add "shrink" and "grow" props to v-flex

See original GitHub issue

I really like how the grid component can be used to create flexible layouts with multiple columns, however I often find myself just wanting a two-column layout where one column is fixed and the other one fills the remaining space. I am struggling to implement this with the current v-flex/v-layout since it expects a fixed percentage for each column/row. I have therefore have had to create my own set of CSS classes to wrap some basic flexbox functionality.

Now with the recent overhaul of the grid system I think almost all my usecases could be solved with the default Vuetify implementation, allowing me to get rid of my custom CSS. I am just missing one small thing:

Instead of having to specify a percentage for v-flex (e.g. md6), it should allow props shrink or grow which will simply override the default flex-shrink/-grow for the element. This will allow me to create layouts such as this: https://codepen.io/anon/pen/zENeda

The extra CSS needed is really simple:

.flex {
  &.grow {
    flex-grow: 1;
    flex-shrink: 0;
  }
  &.shrink {
    flex-grow: 0;
    flex-shrink: 1;
  }
}

If this is already possible using the existing functionality, I apologize and would appreciate an example.

  • What will it allow you to do that you can’t do today?

Create more flexible flexbox layouts (doh!)

  • How will it make current work-arounds straightforward?

Currently I have to rely on some custom CSS classes to get the layout right. With these props added it will be more intuitive.

  • What potential bugs and edge cases does it help to avoid?

I try to keep my CSS to a minimum. This will allow me to remove a few extra classes.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:5
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

4reactions
johnleidercommented, Jan 9, 2019

Hey guys, thank you for your patience on this, I’ll put something together tomorrow.

4reactions
ghostcommented, Jan 9, 2019

@hereiscasio Don’t expect much from docs. Use it like: <v-flex grow> Grow section </v-flex> <v-flex shrink> Shrink section </v-flex>

Read more comments on GitHub >

github_iconTop Results From Across the Web

Grid system — Vuetify
Grow and Shrink. By default, flex components will automatically fill the available space in a row or column. They will also shrink relative...
Read more >
Dell EMC VxFlex Family Overview
VxFlex OS empowers adding and removing storage and compute resources on-the-fly and provides simple non-disruptive migration. Dell EMC VxFlex integrated rack is ...
Read more >
Sherwin-Williams Contractor and Facility Maintenance ... - Issuu
As a result, the challenges of preserving, renovating, growing and ... which do not add to the VOC content and won't compromise the ......
Read more >
We Need a Standard! Developing UI Design Patterns and ...
I'll talk you through my suggestion for approaching: ... <v-layout row justify-start> <v-flex shrink mr-3> <v-icon large>shield</v-icon> </v-flex> <v-flex> ...
Read more >
Systems Management Guide - IBM
v Feature-on-Demand upgrade of the IBM Flex System CN4058 to support ... v Flex System Enterprise Chassis Installation and Service Guide.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found