From 17519b25fdb84a805b1170572c976cf54b0c866c Mon Sep 17 00:00:00 2001 From: Ben Stein-Lobovits Date: Thu, 10 Jul 2014 10:56:18 -0700 Subject: [PATCH 1/3] [FEATURE] Add mobile support --- css/custom.css | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/css/custom.css b/css/custom.css index 1a21886efb..1a1f2519ce 100644 --- a/css/custom.css +++ b/css/custom.css @@ -38,3 +38,60 @@ body .content-root { } } +@media (max-width: 480px) { + body { + overflow-x: hidden; + } + + .header-subnav ul { + margin: auto; + max-width: 480px; + } + + .header-subnav li { + width: 350px; + } + + .header-subnav li a { + padding: 10px 5px !important; + font-size: .8em; + } + + /* Force table to not be like tables anymore */ + table, thead, tbody, th, td, tr { + display: block; + max-width: 300px; + } + + thead tr { + position: absolute; + top: -9999px; + left: -9999px; + } + + tr { border: 1px solid #ccc; } + + td { + /* Behave like a "row" */ + border: none; + border-bottom: 1px solid #eee; + position: relative; + padding-left: 50%; + } + + td:before { + /* Now like a table header */ + position: absolute; + /* Top/left values mimic padding */ + top: 6px; + left: 6px; + width: 45%; + padding-right: 10px; + white-space: nowrap; + } + + + + +} + From 34719649b71a39001d4741ac39ea7528f3e2a97d Mon Sep 17 00:00:00 2001 From: Ben Stein-Lobovits Date: Thu, 10 Jul 2014 10:58:32 -0700 Subject: [PATCH 2/3] [FIX] Center tables --- css/custom.css | 1 + 1 file changed, 1 insertion(+) diff --git a/css/custom.css b/css/custom.css index 1a1f2519ce..44fe052410 100644 --- a/css/custom.css +++ b/css/custom.css @@ -61,6 +61,7 @@ body .content-root { table, thead, tbody, th, td, tr { display: block; max-width: 300px; + margin: auto; } thead tr { From 2dd10385b3e6f827395e442d5f41b545e172a767 Mon Sep 17 00:00:00 2001 From: Ben Stein-Lobovits Date: Thu, 10 Jul 2014 11:01:04 -0700 Subject: [PATCH 3/3] [CHORE] CSS cleanup --- css/custom.css | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/css/custom.css b/css/custom.css index 44fe052410..feafeaaff9 100644 --- a/css/custom.css +++ b/css/custom.css @@ -73,26 +73,10 @@ body .content-root { tr { border: 1px solid #ccc; } td { - /* Behave like a "row" */ border: none; - border-bottom: 1px solid #eee; position: relative; padding-left: 50%; } - td:before { - /* Now like a table header */ - position: absolute; - /* Top/left values mimic padding */ - top: 6px; - left: 6px; - width: 45%; - padding-right: 10px; - white-space: nowrap; - } - - - - }