CSS grid is not displaying correctly on actual mobile browsers (all displays correctly when testing mobile screens on desktop though). EDIT: The issue here happens only on Safari IOS.
If I open the app on a desktop’s browser and use the browser’s testing of different mobile screen sizes and types, I see that the styling works.
However, if I click the link using my (actual) mobile phone’s browser I see that the styling does not work.
i.e. Browser debugging is misleading. This is inconsistent and not how this should work.
What am I missing?
shadow: 0px 0px 15px rgba(0, 0, 0, 0.7);
}
.key-pad {
cursor: pointer;
background: #33373f;
color: #ffff;
border-radius: 8px;
font-size: 2.5rem;
border-style: none;
padding-right: 50px;
padding-bottom: 50px;
padding-left: 50px; */
}
.display {
grid-column: 1 / span 4;
grid-row: 1;
color: #51aaff;
background: none;
height: 5rem;
display: flex;
align-items: flex-end;
justify-content: flex-end;
}
.seven {
grid-column: 1 / span 1;
grid-row: 2;
}
.eight {
grid-column: 2 / span 1;
grid-row: 2;
}
.nine {
grid-column: 3 / span 1;
grid-row: 2;
}
.divide {
grid-column: 4 / span 1;
grid-row: 2;
color: #51aaff;
background-color: #1e242c;
}
.four {
grid-column: 1 / span 1;
grid-row: 3;
}
.five {
grid-column: 2 / span 1;
grid-row: 3;
}
.six {
grid-column: 3 / span 1;
grid-row: 3;
}
.multiply {
grid-column: 4 / span 1;
grid-row: 3;
color: #51aaff;
background-color: #1e242c;
}
.one {
grid-column: 1 / span 1;
grid-row: 4;
}
.two {
grid-column: 2 / span 1;
grid-row: 4;
}
.three {
grid-column: 3 / span 1;
grid-row: 4;
}
.subtract {
grid-column: 4 / span 1;
grid-row: 4;
color: #51aaff;
background-color: #1e242c;
}
.zero {
grid-column: 1 / span 1;
grid-row: 5;
}
.decimal {
grid-column: 2 / span 1;
grid-row: 5;
}
.clear {
grid-column: 3 / span 1;
grid-row: 5;
color: #51aaff;
background-color: #1e242c;
font-size: 2rem;
height: 100%;
width: 100%;
}
.add {
grid-column: 4 / span 1;
grid-row: 5;
color: #51aaff;
background-color: #1e242c;
}
.equals {
grid-column: 1 / span 4;
grid-row: 6;
color: #51aaff;
background-color: #1e242c;
}
footer {
position: fixed;
font-size: small;
color: #fff;
background-color: #262626;
display: flex;
width: 100vw;
height: 4rem;
bottom: 0;
}
.footer-options {
width: 50vw;
display: flex;
justify-content: flex-start;
padding-inline-start: 20px;
align-items: center;
}
footer span {
width: 50vw;
display: flex;
justify-content: flex-end;
padding: 0 20px;
align-items: center;
}
@media (max-width: 900px) {
footer {
flex-wrap: wrap;
height: 5rem;
}
.footer-options {
width: 100vw;
flex-direction: row;
justify-content: center;
padding-inline-start: 0;
align-items: center;
}
footer span {
width: 100vw;
flex-direction: column;
text-align: center;
align-self: flex-start;
}
}
Edit:
See this for the solution: [solved] Need workaround to make CSS grid work on IOS Safari