-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[RFC] Initial papercut fixes for mobile #2
base: master
Are you sure you want to change the base?
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
@media only screen and (max-device-width: 750px) { | ||
/* Make header links visible */ | ||
body > header > .row { | ||
height: auto; | ||
} | ||
|
||
body > header > .row > .hide-on-print { | ||
background-color: #AD6A91; | ||
border-radius: 4px; | ||
} | ||
|
||
/* Add margin between main content hero boxes since they will be on top | ||
* of one another */ | ||
.hero > .col#first { | ||
margin-bottom: 2em; | ||
} | ||
|
||
/* Add margin between download / doc buttons since they will be on top | ||
* of one another */ | ||
.hero > .col#second a.primary { | ||
margin-bottom: 1em; | ||
} | ||
|
||
/* Anchor footer to bottom, decrease font size | ||
* NB: padding-bottom and height will need to be adjusted in the future | ||
* if more content is added to the footer! */ | ||
html { | ||
position: relative; | ||
} | ||
|
||
body, html { | ||
min-height: 100%; | ||
margin: 0; | ||
} | ||
|
||
body > #content { | ||
padding-bottom: 5em; | ||
margin-bottom: 0; | ||
} | ||
|
||
body > footer { | ||
position: absolute; | ||
bottom: 0; | ||
height: 5em; | ||
font-size: 10pt; | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we have a small amount of padding here? Not sure why, but it seems to have none - at least on Fennec. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Totally agree on this. Checkout the demo page now and see if that's better (clearing cache if necessary). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
||
body > footer > .row { | ||
flex-wrap: wrap; | ||
} | ||
|
||
/* Since footer will not be one line, restore left-aligned text */ | ||
body > footer > .row > .col-6#right { | ||
text-align: left; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why 750px?
This seems to work okay on mobiles in both orientation, but on some tablets (Nook, Fire, iPad/iPad mini), it looks weird in portrait mode because the tablet is 768 screen pixels. Namely, the hero columns are close together (they need the margin-bottom at line 14).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The 750px limit is arbitrary, it's just to detect if the device is mobile or not. Would bumping it to 800px solve the tablet problem?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
768px is probably good. That is the width of older laptops/netbooks and most tablets, which would all benefit from this layout.