📱 Ignore custom grid, when on tiny screen/ mobile

This commit is contained in:
Alicia Sykes 2021-10-11 22:17:22 +01:00
parent 67b0e69b78
commit a21dc50597
1 changed files with 6 additions and 4 deletions

View File

@ -105,10 +105,12 @@ export default {
},
gridStyle() {
let styles = '';
styles += this.displayData.itemCountX
? `grid-template-columns: repeat(${this.displayData.itemCountX}, minmax(0, 1fr));` : '';
styles += this.displayData.itemCountY
? `grid-template-rows: repeat(${this.displayData.itemCountY}, minmax(0, 1fr));` : '';
if (document.body.clientWidth > 600) { // Only proceed if not on tiny screen
styles += this.displayData.itemCountX
? `grid-template-columns: repeat(${this.displayData.itemCountX}, minmax(0, 1fr));` : '';
styles += this.displayData.itemCountY
? `grid-template-rows: repeat(${this.displayData.itemCountY}, minmax(0, 1fr));` : '';
}
return styles;
},
},