mirror of
https://github.com/samsonjs/samhuri.net.git
synced 2026-04-27 14:57:40 +00:00
make it look decent on the iPhone X
This commit is contained in:
parent
9c7e1f9568
commit
f39f9b9a0d
2 changed files with 18 additions and 11 deletions
|
|
@ -27,7 +27,7 @@
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
|
||||||
|
|
||||||
<% if (typeof title != 'undefined') { -%>
|
<% if (typeof title != 'undefined') { -%>
|
||||||
<title><%= site %>: <%= title %></title>
|
<title><%= site %>: <%= title %></title>
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,9 @@
|
||||||
@screen-medium: 40rem; /* ~ 640px */
|
@screen-medium: 40rem; /* ~ 640px */
|
||||||
@screen-large: 64rem; /* ~ 1024px */
|
@screen-large: 64rem; /* ~ 1024px */
|
||||||
|
|
||||||
body { font-size: 100%; }
|
body {
|
||||||
|
font-size: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
@media (min-width: @screen-medium) {
|
@media (min-width: @screen-medium) {
|
||||||
body { font-size: 112%; }
|
body { font-size: 112%; }
|
||||||
|
|
@ -224,15 +226,6 @@ header.primary {
|
||||||
} /* nav */
|
} /* nav */
|
||||||
} /* header.primary */
|
} /* header.primary */
|
||||||
|
|
||||||
/* Improve colours in mobile Safari ... wish I could include desktop Safari somehow */
|
|
||||||
@media screen and (-webkit-min-device-pixel-ratio: 2) {
|
|
||||||
header.primary nav {
|
|
||||||
a, a:visited {
|
|
||||||
color: lighten(@highlight, 10%);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
footer {
|
footer {
|
||||||
padding: 1rem 0;
|
padding: 1rem 0;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
@ -244,6 +237,20 @@ footer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* iPhone X */
|
||||||
|
@media only screen and (device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3) {
|
||||||
|
body {
|
||||||
|
padding-bottom: constant(safe-area-inset-bottom);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@media only screen and (orientation: landscape) and (device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3) {
|
||||||
|
.container {
|
||||||
|
padding: 0 constant(safe-area-inset-right) 0 constant(safe-area-inset-left);
|
||||||
|
}
|
||||||
|
header.primary {
|
||||||
|
padding: 0.4rem constant(safe-area-inset-right) 0.4rem constant(safe-area-inset-left);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Archive
|
* Archive
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue