From a1ec8996701c8a1fe99349bd8e33143ffa7501ca Mon Sep 17 00:00:00 2001 From: Brett Smith <brett@sfconservancy.org> Date: Wed, 30 Nov 2016 16:18:06 -0500 Subject: [PATCH] css: Start a separate stylesheet for "big screen" styles. I'm about to add more and I *suspect* this will be easier to maintain in the long term, rather than duplicating the conditional many times. --- www/conservancy/static/css/conservancy-bigscreen.css | 12 ++++++++++++ www/conservancy/static/css/conservancy.css | 12 ------------ www/conservancy/templates/base_conservancy.html | 1 + 3 files changed, 13 insertions(+), 12 deletions(-) create mode 100644 www/conservancy/static/css/conservancy-bigscreen.css diff --git a/www/conservancy/static/css/conservancy-bigscreen.css b/www/conservancy/static/css/conservancy-bigscreen.css new file mode 100644 index 00000000..ebb41a7f --- /dev/null +++ b/www/conservancy/static/css/conservancy-bigscreen.css @@ -0,0 +1,12 @@ +/* "Big screen" means, approximately, bigger than a phone */ + +.column:nth-child(odd) { + clear: both; + float: left; + width: 49%; +} + +.column:nth-child(even) { + float: right; + width: 49%; +} diff --git a/www/conservancy/static/css/conservancy.css b/www/conservancy/static/css/conservancy.css index 1072da4f..b217ed1c 100644 --- a/www/conservancy/static/css/conservancy.css +++ b/www/conservancy/static/css/conservancy.css @@ -262,18 +262,6 @@ h3 { margin-top: .6em; margin-bottom: .4em; } .column h2 a { text-decoration: none; color: #000000; } .column h2 a:hover { text-decoration: underline; } -@media all and (min-width: 67em) { - .column:nth-child(odd) { - clear: both; - float: left; - width: 49%; - } - .column:nth-child(even) { - float: right; - width: 49%; - } -} - #conservancyfooter { margin-top: 1em; border-top: 1px solid #ccc; diff --git a/www/conservancy/templates/base_conservancy.html b/www/conservancy/templates/base_conservancy.html index 1e78b2fc..96f137bf 100644 --- a/www/conservancy/templates/base_conservancy.html +++ b/www/conservancy/templates/base_conservancy.html @@ -13,6 +13,7 @@ <meta name="keywords" content="software, freedom, conservancy, open source, gnu, GNU, Open Source, Free and Open Source, Free and Open Source Software, FLOSS, FOSS, protect, protection, help, policy, linux, non-profit" /> <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" /> <link rel="stylesheet" type="text/css" media="screen" href="/css/conservancy.css" /> + <link rel="stylesheet" type="text/css" media="(min-width: 67em)" href="/css/conservancy-bigscreen.css" /> <link rel="stylesheet" href="/css/jquery-ui-1.8.22.custom.css" /> <link rel="stylesheet" href="/css/jquery.ui.multiprogressbar.css" /> <script type="text/javascript" src="/js/jquery-1.7.2.js"></script>