From 621262911e23ddbd10af85f65cef1f15c8cf89f8 Mon Sep 17 00:00:00 2001 From: Maxime Quandalle Date: Sat, 6 Dec 2014 02:59:54 +0100 Subject: [PATCH] Use CSS instead of an image to draw the menu icon in the mobile doc [stubailo: make the target much bigger than the icon, make icon smaller] --- docs/client/docs.less | 43 +++++++++++++++++++++++++++++++--------- docs/client/layout.html | 4 +++- docs/public/menu.png | Bin 3458 -> 0 bytes 3 files changed, 37 insertions(+), 10 deletions(-) delete mode 100644 docs/public/menu.png diff --git a/docs/client/docs.less b/docs/client/docs.less index e8885eafe3e..285b70f0c5d 100644 --- a/docs/client/docs.less +++ b/docs/client/docs.less @@ -481,13 +481,6 @@ pre { margin-right: 3px; } } - - .open-sidebar { - position: absolute; - left: 10px; - top: 10px; - font-size: 30px; - } } .sidebar-open { @@ -693,6 +686,38 @@ pre { } } -.menu-icon { - height: 0.6em; +// This menu icon is inspired by +// http://www.codesynthesis.co.uk/code-snippets/create-a-hamburger-icon-with-css +@hamburger-icon-size: 18px; + +// Make the target larger than the icon +.hamburger-menu-target { + height: @hamburger-icon-size; + width: @hamburger-icon-size; + padding: 19px 10px; + display: inline-block; + position: absolute; + top: 0; + left: 0; +} + +.hamburger-menu, .hamburger-menu:after, .hamburger-menu:before { + height: @hamburger-icon-size / 6; + width: @hamburger-icon-size; + background-color: #111; + border-radius: 10px; + position: relative; +} + +.hamburger-menu:after, .hamburger-menu:before { + content: ''; + position: absolute; +} + +.hamburger-menu:after { + top: @hamburger-icon-size / 3; +} + +.hamburger-menu:before { + top: @hamburger-icon-size / 1.5; } diff --git a/docs/client/layout.html b/docs/client/layout.html index d8d1da4659a..577e4fc18dc 100644 --- a/docs/client/layout.html +++ b/docs/client/layout.html @@ -46,7 +46,9 @@