diff --git a/client/common/ButtonOrLink.jsx b/client/common/ButtonOrLink.jsx
index 924f10802..fa7258dff 100644
--- a/client/common/ButtonOrLink.jsx
+++ b/client/common/ButtonOrLink.jsx
@@ -5,23 +5,34 @@ import PropTypes from 'prop-types';
/**
* Helper for switching between
-
-
-
+
+
Replace
Ctrl+H
-
-
-
-
-
-
+
+
+
-
-
-
- -
-
+
-
Add File
Ctrl+Alt+N
-
-
- -
-
+
+ -
Add Folder
-
-
- -
-
+
+ -
Run
Ctrl+Enter
-
-
- -
-
+
+ -
Stop
Shift+Ctrl+Enter
-
-
-
-
-
-
+
+
+
-
-
-
- -
-
+
-
Keyboard Shortcuts
-
-
- -
-
+
+ -
Reference
-
-
- -
-
+
+ -
About
-
-
-
-
+
+
+
+
-
+
`;
@@ -968,8 +793,9 @@ exports[`Nav renders editor version for mobile 1`] = `
color: #FFF;
}
-
File
-
-
- New
-
+
+ New
-
-
- Save
-
+
+ Save
-
-
- Examples
-
+
+ Examples
Edit
-
-
- Tidy Code
-
+
+ Tidy Code
-
-
- Find
-
+
+ Find
Sketch
-
-
- Add File
-
+
+ Add File
-
-
- Add Folder
-
+
+ Add Folder
Settings
-
-
- Preferences
-
+
+ Preferences
-
-
- Language
-
+
+ Language
Help
-
-
- Keyboard Shortcuts
-
+
+ Keyboard Shortcuts
-
-
- Reference
-
+
+ Reference
-
-
- About
-
+
+ About
-
+
`;
diff --git a/client/styles/components/_nav.scss b/client/styles/components/_nav.scss
index 58691ff25..03261aa5c 100644
--- a/client/styles/components/_nav.scss
+++ b/client/styles/components/_nav.scss
@@ -24,6 +24,13 @@
// padding-left: #{math.div(20, $base-font-size)}rem;
}
+.nav__menubar {
+ display: flex;
+ flex-direction: row;
+ width:100%;
+ justify-content: space-between;
+}
+
.nav__items-left,
.nav__items-right {
list-style: none;
@@ -58,6 +65,62 @@
}
}
+// base focus styles
+.nav__item button:focus {
+ outline: none;
+
+ .nav__item-header {
+ @include themify() {
+ color: getThemifyVariable('nav-hover-color');
+ }
+ }
+
+ & g, & path {
+ @include themify() {
+ fill: getThemifyVariable('nav-hover-color');
+ }
+ }
+}
+
+// for keyboard navigation
+.nav__item button:focus-visible {
+ @include themify() {
+ box-shadow: 0 0 0 2px getThemifyVariable('nav-hover-color');
+ }
+}
+
+// focus styles for mouse interactions
+.nav__item button:focus:not(:focus-visible) {
+ @include themify() {
+ box-shadow: 0 0 0 2px getThemifyVariable('nav-hover-color');
+ }
+}
+
+.nav__dropdown-item {
+ & button:focus,
+ & a:focus {
+ outline: none;
+ @include themify() {
+ color: getThemifyVariable('button-hover-color');
+ background-color: getThemifyVariable('nav-hover-color');
+ }
+ }
+
+ & button:focus-visible,
+ & a:focus-visible {
+ @include themify() {
+ box-shadow: 0 0 0 2px getThemifyVariable('nav-hover-color');
+ }
+ }
+
+ & button:focus .nav__keyboard-shortcut,
+ & a:focus .nav__keyboard-shortcut {
+ @include themify() {
+ color: getThemifyVariable('button-hover-color');
+ }
+ }
+}
+
.nav__item--no-icon {
padding-left: #{math.div(15, $base-font-size)}rem;
}