Commit 50430960 authored by James Cook's avatar James Cook Committed by Commit Bot

settings: Fix outline on "Add language" button after dialog closed

The outline was appearing even if the user used the mouse to click on
the button. Elsewhere in settings we only show outlines when the user
uses the keyboard. Update action-link CSS styles to check the global
focus-outline-visible style added by FocusOutlineManager.

I did this at the settings level, rather than for all action-links,
because I'm not sure that all consumers of action-link need or want
a dependency on FocusOutlineManager.

Bug: 995921
Test: no outline when button clicked with mouse, outline present when triggered with keyboard
Change-Id: Idb7d4e0f96bb70d1d24c63fbc760460198a08304
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1762695Reviewed-by: default avatarHector Carmona <hcarmona@chromium.org>
Commit-Queue: James Cook <jamescook@chromium.org>
Cr-Commit-Position: refs/heads/master@{#689102}
parent 38e1371b
...@@ -186,6 +186,13 @@ ...@@ -186,6 +186,13 @@
min-height: inherit; min-height: inherit;
} }
/* Link buttons use FocusOutlineManager to only show outlines when focus
* was triggered by keyboard. */
:host-context(html:not(.focus-outline-visible))
.list-button[is='action-link'] {
outline: none;
}
/* A row with two lines of text. Often the lower line will be .secondary. /* A row with two lines of text. Often the lower line will be .secondary.
*/ */
.two-line { .two-line {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment