yodalr yodalr - 9 months ago 73
CSS Question

CSS | grid-auto-columns: min-content | not working in IOS 10.3.3

Is there any substitution for this, or should I revert back to floats and wait until support arrives?

.grid_root {
display: grid;
grid-column-gap: 1px;
grid-auto-flow: column;
grid-auto-columns: min-content;
}


Sample (use full screen preview in phone):
https://plnkr.co/edit/c6Znq3rtEfQK0Ky1wugt?p=preview

Answer Source

Try using webkit prefixes. Works on Safari in my iPad.

.grid_root {
  display: grid;
  grid-column-gap: 1px;
  grid-auto-flow: column;
  grid-auto-columns: -webkit-min-content; /* new */
  grid-auto-columns: min-content;
}

revised demo

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download