From e88970d172eea496b9dacb07fb3a766ea317b695 Mon Sep 17 00:00:00 2001 From: Matt Ickstadt Date: Thu, 26 Jul 2018 14:26:34 -0500 Subject: [PATCH] Don't use CSS variables in media queries since they don't work :'( --- src/theme/css/chrome.css | 8 ++++---- src/theme/css/variables.css | 4 ---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/theme/css/chrome.css b/src/theme/css/chrome.css index fe15bb76..e5defd1e 100644 --- a/src/theme/css/chrome.css +++ b/src/theme/css/chrome.css @@ -47,7 +47,7 @@ a > .hljs { cursor: pointer; transition: color 0.5s; } -@media only screen and (max-width: var(--narrow-device-max-width)) { +@media only screen and (max-width: 420px) { #menu-bar i, #menu-bar .icon-button { margin: 0 5px; } @@ -155,12 +155,12 @@ html:not(.sidebar-visible) #menu-bar:not(:hover).folded > #menu-bar-sticky-conta right: var(--page-padding); } -@media only screen and (max-width: var(--page-plus-sidebar-width)) { +@media only screen and (max-width: 1080px) { .nav-wide-wrapper { display: none; } .nav-wrapper { display: block; } } -@media only screen and (max-width: calc(var(--page-plus-sidebar-width) + var(--sidebar-width))) { +@media only screen and (max-width: 1380px) { .sidebar-visible .nav-wide-wrapper { display: none; } .sidebar-visible .nav-wrapper { display: block; } } @@ -321,7 +321,7 @@ ul#searchresults span.teaser em { .sidebar-visible .page-wrapper { transform: translateX(var(--sidebar-width)); } -@media only screen and (min-width: var(--sidebar-reflow-width)) { +@media only screen and (min-width: 620px) { .sidebar-visible .page-wrapper { transform: none; margin-left: var(--sidebar-width); diff --git a/src/theme/css/variables.css b/src/theme/css/variables.css index aea51b63..586706af 100644 --- a/src/theme/css/variables.css +++ b/src/theme/css/variables.css @@ -5,10 +5,6 @@ --sidebar-width: 300px; --page-padding: 15px; --content-max-width: 750px; - --content-min-width: 320px; - --page-plus-sidebar-width: calc(var(--content-max-width) + var(--sidebar-width) + var(--page-padding) * 2); - --sidebar-reflow-width: calc(var(--sidebar-width) + var(--content-min-width)); - --narrow-device-max-width: 420px; } /* Themes */