Skip to content

Commit

Permalink
Improved focus indication in split button panel.
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyanziano committed Nov 18, 2019
1 parent 1f0e1e6 commit ee2c61c
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [1982](https://github.com/microsoft/BotFramework-Emulator/pull/1982)
- [1983](https://github.com/microsoft/BotFramework-Emulator/pull/1983)
- [1990](https://github.com/microsoft/BotFramework-Emulator/pull/1990)
- [1991](https://github.com/microsoft/BotFramework-Emulator/pull/1991)

## Removed
- [main] Removed unused `VersionManager` class in PR [1991](https://github.com/microsoft/BotFramework-Emulator/pull/1991)
Expand Down
2 changes: 2 additions & 0 deletions packages/app/client/src/ui/styles/themes/dark.css
Expand Up @@ -236,8 +236,10 @@ html {
--split-button-expanded-outline: transparent;
--split-button-separator-bg-color: #C8C8C8;
--split-button-panel-color: var(--neutral-16);
--split-button-panel-border: 0;
--split-button-panel-bg-color: var(--neutral-1);
--split-button-selected-item-bg-color: var(--neutral-3);
--split-button-selected-item-border: 1px solid #00BCF2;

/* Icons */
--cosmos-db-contrast: var(--neutral-1);
Expand Down
8 changes: 5 additions & 3 deletions packages/app/client/src/ui/styles/themes/high-contrast.css
Expand Up @@ -234,9 +234,11 @@ html {
--split-button-selected-outline: 1px solid #F38518;
--split-button-expanded-outline: 1px solid #F38518;
--split-button-separator-bg-color: #C8C8C8;
--split-button-panel-color: var(--neutral-16);
--split-button-panel-bg-color: var(--neutral-1);
--split-button-selected-item-bg-color: var(--neutral-3);
--split-button-panel-color: var(--neutral-1);
--split-button-panel-border: 1px solid #00BCF2;
--split-button-panel-bg-color: var(--neutral-16);
--split-button-selected-item-bg-color: var(--neutral-16);
--split-button-selected-item-border: 1px dashed #F38518;

/* Icons */
--cosmos-db-contrast: var(--neutral-1);
Expand Down
2 changes: 2 additions & 0 deletions packages/app/client/src/ui/styles/themes/light.css
Expand Up @@ -236,8 +236,10 @@ html {
--split-button-expanded-outline: transparent;
--split-button-separator-bg-color: #C8C8C8;
--split-button-panel-color: var(--neutral-16);
--split-button-panel-border: 0;
--split-button-panel-bg-color: var(--neutral-1);
--split-button-selected-item-bg-color: var(--neutral-3);
--split-button-selected-item-border: 1px solid #00BCF2;

/* Icons */
--cosmos-db-contrast: var(--neutral-16);
Expand Down
Expand Up @@ -32,15 +32,16 @@
//

.panel {
box-sizing: border-box;
position: absolute;
background-color: var(--split-button-panel-bg-color);
background-color: var(--split-button-panel-bg-color);
border: var(--split-button-panel-border);
box-shadow: 1px 1px 3px 0 rgba(0,0,0,0.3);
list-style: none;
margin: 0;
padding: 0;

&:focus {
border: 0;
outline: 0;
}
}
Expand All @@ -50,10 +51,12 @@
padding: 3px 26px;
border: 0;
background: none;
border: 1px solid transparent;
color: var(--split-button-panel-color);
cursor: pointer;

&:hover, &.selected {
background-color: var(--split-button-selected-item-bg-color);
border: var(--split-button-selected-item-border);
}
}
Expand Up @@ -75,7 +75,7 @@ export class SplitButtonPanel extends React.Component<SplitButtonPanelProps> {
if (expanded) {
const caretClientRect = caretRef.getBoundingClientRect();
const inlineStyle = {
left: `${caretClientRect.left}px`,
left: `${caretClientRect.left - 1}px`,
top: `${caretClientRect.bottom}px`,
};

Expand Down

0 comments on commit ee2c61c

Please sign in to comment.