Reputation: 957
I'd like to set the height of the data rows below the minimum set by Vuetify.css. I can set the height to any arbitrary large value, but anything below ~50px does nothing. Is there some CSS overwrite I can do to accomplish this? I would prefer to not scour the Vuetify.css file and make the change there but I'm not able to achieve the desired format using !important
either.
<div id="app">
<v-app id="inspire">
<v-data-table
:headers="headers"
:items="desserts"
hide-actions
class="elevation-1"
>
<template slot="items" slot-scope="props">
<tr style="height: 10px;"> <!-- Does nothing. height: 100px works fine. -->
<td>{{ props.item.name }}</td>
<td class="text-xs-right">{{ props.item.calories }}</td>
<td class="text-xs-right">{{ props.item.fat }}</td>
<td class="text-xs-right">{{ props.item.carbs }}</td>
<td class="text-xs-right">{{ props.item.protein }}</td>
<td class="text-xs-right">{{ props.item.iron }}</td>
</tr>
</template>
</v-data-table>
</v-app>
</div>
<script>
new Vue({
el: '#app',
data () {
return {
headers: [
{
text: 'Dessert (100g serving)',
align: 'left',
sortable: false,
value: 'name'
},
{ text: 'Calories', value: 'calories' },
{ text: 'Fat (g)', value: 'fat' },
{ text: 'Carbs (g)', value: 'carbs' },
{ text: 'Protein (g)', value: 'protein' },
{ text: 'Iron (%)', value: 'iron' }
],
desserts: [
{
value: false,
name: 'Frozen Yogurt',
calories: 159,
fat: 6.0,
carbs: 24,
protein: 4.0,
iron: '1%'
},
{
value: false,
name: 'Ice cream sandwich',
calories: 237,
fat: 9.0,
carbs: 37,
protein: 4.3,
iron: '1%'
}
]
}
}
})
</script>
Upvotes: 1
Views: 8527
Reputation: 2154
You can change row height with css
<style lang="css">
tr{
height: 70px !important;
}
</style>
Upvotes: 0
Reputation: 643
It might be because of the td have it height properties. Try to change the height of the td by overwriting it.
table.v-table tbody td, table.v-table tbody th {
height: 19px;
}
Upvotes: 6