Skip to content
This repository has been archived by the owner on Mar 29, 2023. It is now read-only.

Commit

Permalink
feat: improve accessibility
Browse files Browse the repository at this point in the history
+ make header font-weight bolder as 500 often defaults to normal
+ slightly improve muted / template headings color
+ make colors + weight configurable
  • Loading branch information
nikku committed Mar 28, 2022
1 parent 8435007 commit 762b354
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
4 changes: 4 additions & 0 deletions example/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -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%;
Expand Down
15 changes: 9 additions & 6 deletions src/change-menu/ChangeMenu.css
Original file line number Diff line number Diff line change
Expand Up @@ -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%);
Expand All @@ -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 {
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 762b354

Please sign in to comment.