From 84f548525a9ca23bab71cca2909a7953ff134b57 Mon Sep 17 00:00:00 2001 From: Igor Kalnitsky Date: Sat, 2 Jan 2016 22:29:46 +0200 Subject: [PATCH] Do not scroll when ribbon is enabled There's Safari (probably webkit) bug with 'overflow-x: hidden' CSS rule. The thing is that when it's enabled for body element, the scrollbar is invisibe, but scrolling is working. This patch introduces workaround for the issue. --- holocron/theme/static/style.css | 6 +++++- holocron/theme/templates/base.html | 5 +---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/holocron/theme/static/style.css b/holocron/theme/static/style.css index 3277303..bda360e 100644 --- a/holocron/theme/static/style.css +++ b/holocron/theme/static/style.css @@ -15,16 +15,20 @@ general -------------------------------------------------------------------- */ +html { + overflow-x: hidden; +} + body { border-top: 5px solid #2f5a8b; background-color: #fefefe; color: #3f3f3f; font: 18px/28px 'PT Serif', Georgia, serif; + position: relative; overflow-x: hidden; /* prevent font scaling in landscape for iPhone */ -webkit-text-size-adjust: 100%; - text-size-adjust: 100%; } h1, h2, h3, h4, h5, h6 { diff --git a/holocron/theme/templates/base.html b/holocron/theme/templates/base.html index 5633aeb..461f4ec 100644 --- a/holocron/theme/templates/base.html +++ b/holocron/theme/templates/base.html @@ -53,10 +53,7 @@ {% if theme.ribbon %} - - {{ theme.ribbon.text }} - - + {{ theme.ribbon.text }} {% endif %} {% include 'counters.html' %}