From 762b354122492c0faeec26da35e3171750614b8e Mon Sep 17 00:00:00 2001 From: Nico Rehwaldt Date: Mon, 28 Mar 2022 14:54:30 +0200 Subject: [PATCH] feat: improve accessibility + make header font-weight bolder as 500 often defaults to normal + slightly improve muted / template headings color + make colors + weight configurable --- example/style.css | 4 ++++ src/change-menu/ChangeMenu.css | 15 +++++++++------ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/example/style.css b/example/style.css index 8d40971..acef63a 100644 --- a/example/style.css +++ b/example/style.css @@ -8,6 +8,10 @@ --font-family: var(--font-family); } +.cmd-change-menu { + --change-menu-header-font-weight: 500; +} + html, body, #canvas { width: 100%; height: 100%; diff --git a/src/change-menu/ChangeMenu.css b/src/change-menu/ChangeMenu.css index f6a7f79..12dbf65 100644 --- a/src/change-menu/ChangeMenu.css +++ b/src/change-menu/ChangeMenu.css @@ -9,6 +9,8 @@ left: 0; z-index: 200; + line-height: 1; + --color-white: #fff; --color-black-opacity-10: hsla(0, 0%, 0%, 10%); --color-black-opacity-25: hsla(0, 0%, 0%, 25%); @@ -32,12 +34,13 @@ --change-menu-shadow-color: var(--color-black-opacity-25); --text-color: #22242A; - --text-muted-color: #818698; + --text-muted-color: #707585; --text-size-base: 14px; --text-size-small: 14px; --text-line-height: 21px; - line-height: 1; + --change-menu-category-color: var(--text-muted-color); + --change-menu-header-font-weight: bolder; } .cmd-change-menu__backdrop { @@ -108,7 +111,7 @@ .cmd-change-menu__title { font-size: 14px; - font-weight: 500; + font-weight: var(--change-menu-header-font-weight); flex: 1; margin: 0; } @@ -145,12 +148,12 @@ } .cmd-change-menu__entry_header { - font-weight: 500; - color: #666; + font-weight: var(--change-menu-header-font-weight); + color: var(--change-menu-category-color); } .cmd-change-menu__entry_header:not(:first-child) { - margin-top: 6px; + margin-top: 8px; } .cmd-change-menu__muted-entry {