History

Improve table horizontal scrolling on mobile

Thibaut Courouble committed 9 years ago

Commit 28587711 parent 302e3f15 files · +25 −22Browse files

Unified · Split

5 files
  1. assets/javascripts/templates/pages/about_tmpl.coffee +9 −7
  2. assets/javascripts/templates/pages/offline_tmpl.coffee +11 −9
  3. assets/stylesheets/components/_content.scss +3 −0
  4. assets/stylesheets/components/_mobile.scss +0 −6
  5. assets/stylesheets/pages/_mdn.scss +2 −0
assets/javascripts/templates/pages/about_tmpl.coffee+9−7
@@ -37,13 +37,15 @@ app.templates.aboutPage = -> """ · 36 unmodified lines
3737 <li><a href="http://www.jeremykratz.com/">Jeremy Kratz</a> for the C/C++ logo
3838 </ul>
3939
40− <table class="_credits">
41− <tr>
42− <th>Documentation
43− <th>Copyright
44− <th>License
45− #{("<tr><td>#{c[0]}<td>&copy; #{c[1]}<td><a href=\"#{c[3]}\">#{c[2]}</a>" for c in credits).join('')}
46− </table>
40+ <div class="_table">
41+ <table class="_credits">
42+ <tr>
43+ <th>Documentation
44+ <th>Copyright
45+ <th>License
46+ #{("<tr><td>#{c[0]}<td>&copy; #{c[1]}<td><a href=\"#{c[3]}\">#{c[2]}</a>" for c in credits).join('')}
47+ </table>
48+ </div>
4749
4850 <h2 class="_block-heading" id="faq">Questions & Answers</h2>
4951 <dl>
assets/javascripts/templates/pages/offline_tmpl.coffee+11−9
@@ -10,15 +10,17 @@ app.templates.offlinePage = (docs) -> """ · 9 unmodified lines
1010 </div>
1111 </div>
1212
13− <table class="_docs">
14− <tr>
15− <th>Documentation</th>
16− <th class="_docs-size">Size</th>
17− <th>Status</th>
18− <th>Action</th>
19− </tr>
20− #{docs}
21− </table>
13+ <div class="_table">
14+ <table class="_docs">
15+ <tr>
16+ <th>Documentation</th>
17+ <th class="_docs-size">Size</th>
18+ <th>Status</th>
19+ <th>Action</th>
20+ </tr>
21+ #{docs}
22+ </table>
23+ </div>
2224 <p class="_note"><strong>Note:</strong> your browser may delete DevDocs's offline data if your computer is running low on disk space and you haven't used the app in a while. Load this page before going offline to make sure the data is still there.
2325 <h2 class="_block-heading">Questions & Answers</h2>
2426 <dl>
assets/stylesheets/components/_content.scss+3−0
@@ -373,6 +373,9 @@ · 372 unmodified lines
373373 ._code { @extend %code; }
374374 ._highlight { background: $highlightBackground !important; }
375375
376+._table { width: 100%; }
377+._mobile ._table { overflow-x: auto; }
378+
376379 ._pre-clip {
377380 display: none;
378381 position: absolute;
assets/stylesheets/components/_mobile.scss+0−6
@@ -105,12 +105,6 @@ · 104 unmodified lines
105105 max-width: none;
106106 margin-left: 0;
107107 }
108−
109− // Responsive browser compatibility tables
110− #compat-desktop,
111− #compat-mobile {
112− overflow-x: auto;
113− }
114108 }
115109
116110 //
assets/stylesheets/pages/_mdn.scss+2−0
@@ -102,4 +102,6 @@ · 101 unmodified lines
102102 .cleared { clear: both; } // CSS/box-shadow
103103
104104 code > strong { font-weight: normal; }
105+
106+ #compat-desktop, #compat-mobile { @extend ._table; }
105107 }