From 1bf18fe4edf46f86e40cce0e4e4d2764119ba702 Mon Sep 17 00:00:00 2001 From: Christopher Chedeau Date: Sat, 11 Jan 2020 15:59:42 -0800 Subject: [PATCH] Tweak context menu style (#320) - Move the context menu right next to the mouse so it's not so far away. But 1px out so that nothing is selected until you move your mouse - Change the colors to be closer to the macos one. Unfortunately, macos has a 0.5px border that I'm not able to reproduce without some annoying hacks, 1px it'll be. --- src/components/ContextMenu.css | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/src/components/ContextMenu.css b/src/components/ContextMenu.css index 78366b17..aea0c845 100644 --- a/src/components/ContextMenu.css +++ b/src/components/ContextMenu.css @@ -5,6 +5,10 @@ padding: 0; list-style: none; user-select: none; + margin: -4px 0 0 1px; + padding: 4px 0; + background-color: #f2f2f2; + border: 1px solid #bcbcbc; } .context-menu__option { @@ -17,18 +21,16 @@ margin: 0; text-align: left; border-radius: 0; + padding-left: 20px; + background-color: #f2f2f2; + border: none; +} + +.context-menu-option:hover { + color: white; + background-color: #4e95f5; } .context-menu-option:focus { z-index: 1; } - -.context-menu__option:first-child .context-menu-option { - border-top-left-radius: 4px; - border-top-right-radius: 4px; -} - -.context-menu__option:last-child .context-menu-option { - border-bottom-left-radius: 4px; - border-bottom-right-radius: 4px; -}