From 217c9f758b1a1372fb9fc5fff9cb1b018e4d5373 Mon Sep 17 00:00:00 2001 From: Luke Childs Date: Tue, 20 Sep 2016 22:11:12 +0100 Subject: [PATCH] Do hamburger menu in CSS --- public/assets/enhancements.js | 1 - public/assets/style.css | 16 ++++++++++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/public/assets/enhancements.js b/public/assets/enhancements.js index 04e16c0..6e64592 100644 --- a/public/assets/enhancements.js +++ b/public/assets/enhancements.js @@ -164,7 +164,6 @@ DOMReady(function() { var menuButton = create('div'); menuButton.classList.add('menu'); - menuButton.innerHTML = '☰'; menuButton.style.height = elem('.title').offsetHeight + 'px'; elem('header .wrapper').appendChild(menuButton); }); diff --git a/public/assets/style.css b/public/assets/style.css index 5913b02..1f1c89d 100644 --- a/public/assets/style.css +++ b/public/assets/style.css @@ -111,14 +111,22 @@ h1 { } .menu { + position: relative; width: 4rem; - border-right: 1px solid #eee; - text-align: center; - line-height: 1.1em; font-size: 3em; - color: #b24592; + border-right: 1px solid #eee; cursor: pointer; } +.menu:before { + content: ""; + position: absolute; + top: 0.3em; + left: 0.15em; + width: 1em; + height: 0.125em; + border-top: 0.375em double #b24592; + border-bottom: 0.125em solid #b24592; +} /* Main */ main {