vuetify v-col xs="12" only fill half the width
It's a combination of two things
- There is no XS prop available to v-col.
- Columns automatically take up the entire available space within its parent container unless you've specified the width it should take up before hand.
Columns will automatically take up an equal amount of space within their parent container. This can be modified using the cols prop. You can also utilize the sm, md, lg, and xl props to further define how the column will be sized in different viewport sizes.
https://vuetifyjs.com/en/components/grids#auto-sizing-columns
To address this, set the "cols" prop of v-col to 12 to indicate that it should take up 12 columns across all viewports. You can consider it to be the "xs" property you're trying to use. Then, any larger viewports will inherit the last valid size.
<v-col
v-for="n in 3"
:key="n"
cols="12"
md="4"
>
Ravi Anand
A Frontend specialized Software Engineer, with over 5 years’ experience of working on Frontend and Backend applications, software assignments, and projects. Able to utilize extensive technical skills to deliver strategic, robust, and innovative solutions within challenging real-world environments. Personable, creative, pragmatic, and with a blend of both technical and people skills. Have proven expertise in complex interactive engagements, scope, estimation, delivery, and quality management. Skilled in providing leadership, direction, strategy, and vision in the areas of technology and web App development.
Updated on August 28, 2020Comments
-
Ravi Anand over 3 years
I am wondering why vuetify breakpoints are not working on when screen size is <600px
new Vue({ el: '#app', vuetify: new Vuetify(), })
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/vuetify.min.css" rel="stylesheet"> <script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.js"></script> <div id="app"> <v-app id="inspire"> <v-container class="grey lighten-5"> <v-row no-gutters> <v-col v-for="n in 3" :key="n" xs="12" sm="12" md="4" > <v-card class="pa-2" outlined tile > One of three columns </v-card> </v-col> </v-row> </v-container> </v-app> </div>
I am expecting same column width when screen size is
XS
-
Chris Claude almost 4 yearsis the XS prop available on v-row or any other grid container? if not where is the XS prop applicable?
-
Trenton Trama almost 4 yearsVuetify 1.5 used the
xs
property on containers, but replaced it withcols
instead in Vuetify 2.