Skip to content

Commit c8d0b6a

Browse files
committed
Fix right gutters in Gmail iOS+Android
Resolves #89 … again…
1 parent c9d2129 commit c8d0b6a

File tree

3 files changed

+44
-24
lines changed

3 files changed

+44
-24
lines changed

cerberus-fluid.html

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -105,19 +105,25 @@
105105

106106
/* What it does: Removes right gutter in Gmail iOS app: https://github.com/TedGoas/Cerberus/issues/89 */
107107
/* Create one of these media queries for each additional viewport size you'd like to fix */
108-
/* Thanks to Eric Lepetit (@ericlepetitsf) for help troubleshooting */
109-
@media only screen and (min-device-width: 375px) and (max-device-width: 413px) { /* iPhone 6 and 6+ */
108+
109+
/* iPhone 4, 4S, 5, 5S, 5C, and 5SE */
110+
@media only screen and (min-device-width: 320px) and (max-device-width: 374px) {
111+
.email-container {
112+
min-width: 320px !important;
113+
}
114+
}
115+
/* iPhone 6, 6S, 7, 8, and X */
116+
@media only screen and (min-device-width: 375px) and (max-device-width: 413px) {
110117
.email-container {
111118
min-width: 375px !important;
112119
}
113120
}
114-
115-
@media screen and (max-width: 480px) {
116-
/* What it does: Forces Gmail app to display email full width */
117-
div > u ~ div .gmail {
118-
min-width: 100vw;
119-
}
120-
}
121+
/* iPhone 6+, 7+, and 8+ */
122+
@media only screen and (min-device-width: 414px) {
123+
.email-container {
124+
min-width: 414px !important;
125+
}
126+
}
121127

122128
</style>
123129
<!-- CSS Reset : END -->

cerberus-hybrid.html

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -105,16 +105,24 @@
105105

106106
/* What it does: Removes right gutter in Gmail iOS app: https://github.com/TedGoas/Cerberus/issues/89 */
107107
/* Create one of these media queries for each additional viewport size you'd like to fix */
108-
/* Thanks to Eric Lepetit @ericlepetitsf) for help troubleshooting */
109-
@media only screen and (min-device-width: 375px) and (max-device-width: 413px) { /* iPhone 6 and 6+ */
108+
109+
/* iPhone 4, 4S, 5, 5S, 5C, and 5SE */
110+
@media only screen and (min-device-width: 320px) and (max-device-width: 374px) {
111+
.email-container {
112+
min-width: 320px !important;
113+
}
114+
}
115+
/* iPhone 6, 6S, 7, 8, and X */
116+
@media only screen and (min-device-width: 375px) and (max-device-width: 413px) {
110117
.email-container {
111118
min-width: 375px !important;
112119
}
113120
}
114-
115-
/* What it does: Forces Gmail app to display email full width */
116-
div > u ~ div .gmail {
117-
min-width: 100vw;
121+
/* iPhone 6+, 7+, and 8+ */
122+
@media only screen and (min-device-width: 414px) {
123+
.email-container {
124+
min-width: 414px !important;
125+
}
118126
}
119127

120128
</style>

cerberus-responsive.html

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -105,19 +105,25 @@
105105

106106
/* What it does: Removes right gutter in Gmail iOS app: https://github.com/TedGoas/Cerberus/issues/89 */
107107
/* Create one of these media queries for each additional viewport size you'd like to fix */
108-
/* Thanks to Eric Lepetit (@ericlepetitsf) for help troubleshooting */
109-
@media only screen and (min-device-width: 375px) and (max-device-width: 413px) { /* iPhone 6 and 6+ */
108+
109+
/* iPhone 4, 4S, 5, 5S, 5C, and 5SE */
110+
@media only screen and (min-device-width: 320px) and (max-device-width: 374px) {
111+
.email-container {
112+
min-width: 320px !important;
113+
}
114+
}
115+
/* iPhone 6, 6S, 7, 8, and X */
116+
@media only screen and (min-device-width: 375px) and (max-device-width: 413px) {
110117
.email-container {
111118
min-width: 375px !important;
112119
}
113120
}
114-
115-
@media screen and (max-width: 480px) {
116-
/* What it does: Forces Gmail app to display email full width */
117-
div > u ~ div .gmail {
118-
min-width: 100vw;
119-
}
120-
}
121+
/* iPhone 6+, 7+, and 8+ */
122+
@media only screen and (min-device-width: 414px) {
123+
.email-container {
124+
min-width: 414px !important;
125+
}
126+
}
121127

122128
</style>
123129
<!-- CSS Reset : END -->

0 commit comments

Comments
 (0)