From 813ce4ad2f931938fb11e13957e4c7232ad1d517 Mon Sep 17 00:00:00 2001 From: Aki Date: Tue, 11 May 2021 22:13:45 +0200 Subject: Fixed toolbar on small screens --- style.css | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/style.css b/style.css index 8d42cd7..671aaf4 100644 --- a/style.css +++ b/style.css @@ -77,10 +77,10 @@ body { } .toolbar-wrap { - max-width: unset; + max-width: 26em; position: absolute; - width: 26em; - left: -26em; + width: 100%; + left: max(-100%, -26em); top: 0; transition: left 0.3s; z-index: 10000; @@ -93,11 +93,17 @@ body { .toolbar-wrap button { position: absolute; top: 1em; - left: calc(100% + 1em); + right: -7em; background: #282828; border: 1px solid #504945; color: #ebdbd2; - padding: 0.5em 0.8em; + width: 6em; + padding: 0.5em; + transition: right 0.3s; +} + +.toolbar-wrap.enabled button { + right: 1em; } .toolbar-wrap button:hover { -- cgit v1.1