Skip to content

Commit

Permalink
feat(surface-element): active-outline
Browse files Browse the repository at this point in the history
  • Loading branch information
alimd committed Jan 22, 2023
1 parent c492c1a commit 3261091
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions ui/element/src/surface-element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {AlwatrDummyElement} from './dummy-element.js';
* @attr {Number|Boolean} elevated - tinted by default
* @attr {Boolean} filled
* @attr {Boolean} outlined
* @attr {Boolean} active-outline - outline on active and focus
* @attr {Boolean} disabled
*
* @cssprop {String} [--_surface-color-on=var(--sys-color-on-surface-hsl)]
Expand Down Expand Up @@ -87,6 +88,13 @@ export class AlwatrSurfaceElement extends AlwatrDummyElement {
--_surface-state-opacity: var(--sys-surface-state-opacity-focus);
}
:host([active-outline]:active),
:host([active-outline]:focus),
:host([active-outline]:focus-within) {
border-color: var(--sys-color-primary);
box-shadow: 0 0 0.4px 0.8px var(--sys-color-primary);
}
:host([stated]:hover:not(:active)),
:host([stated]:focus),
:host([stated]:focus-within) {
Expand Down

0 comments on commit 3261091

Please sign in to comment.