File tree Expand file tree Collapse file tree 3 files changed +29
-5
lines changed Expand file tree Collapse file tree 3 files changed +29
-5
lines changed Original file line number Diff line number Diff line change 104
104
105
105
.uui-text a : link ,
106
106
.uui-text a : active {
107
- color : var (--uui-color-space-cadet );
107
+ color : var (--uui-color-interactive );
108
108
}
109
109
.uui-text a : hover {
110
- color : var (--uui-color-violet-blue );
110
+ color : var (--uui-color-interactive-emphasis );
111
111
}
112
112
113
113
.uui-text small {
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ export class UUITableCellElement extends LitElement {
14
14
static styles = [
15
15
css `
16
16
:host {
17
+ position: relative;
17
18
display: table-cell;
18
19
height: var(--uui-table-cell-height, var(--uui-size-12));
19
20
padding: var(
Original file line number Diff line number Diff line change @@ -23,24 +23,47 @@ export class UUITableRowElement extends SelectOnlyMixin(
23
23
:host {
24
24
display: table-row;
25
25
position: relative;
26
+ outline-offset: -3px;
26
27
}
27
28
28
29
:host([selectable]) {
29
30
cursor: pointer;
30
31
}
31
32
33
+ :host(:focus) {
34
+ outline: calc(2px * var(--uui-show-focus-outline, 1)) solid
35
+ var(--uui-color-focus);
36
+ }
32
37
:host([selected]) {
33
38
outline: 2px solid
34
39
var(--uui-table-row-color-selected, var(--uui-color-selected));
35
- outline-offset: -3px;
36
40
}
37
-
38
- :host(:focus) {
41
+ :host([selected]:focus) {
39
42
outline-color: var(--uui-color-focus);
40
43
}
41
44
` ,
42
45
] ;
43
46
47
+ constructor ( ) {
48
+ super ( ) ;
49
+
50
+ // hide outline if mouse-interaction:
51
+ let hadMouseDown = false ;
52
+ this . addEventListener ( 'blur' , ( ) => {
53
+ if ( hadMouseDown === false ) {
54
+ this . style . setProperty ( '--uui-show-focus-outline' , '1' ) ;
55
+ }
56
+ hadMouseDown = false ;
57
+ } ) ;
58
+ this . addEventListener ( 'mousedown' , ( ) => {
59
+ this . style . setProperty ( '--uui-show-focus-outline' , '0' ) ;
60
+ hadMouseDown = true ;
61
+ } ) ;
62
+ this . addEventListener ( 'mouseup' , ( ) => {
63
+ hadMouseDown = false ;
64
+ } ) ;
65
+ }
66
+
44
67
connectedCallback ( ) {
45
68
super . connectedCallback ( ) ;
46
69
this . setAttribute ( 'role' , 'row' ) ;
You can’t perform that action at this time.
0 commit comments