mirror of https://github.com/Lissy93/dashy.git
📱 Ignore custom grid, when on tiny screen/ mobile
This commit is contained in:
parent
67b0e69b78
commit
a21dc50597
|
@ -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;
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue