Skip to content

Commit beb3230

Browse files
chore(calendar-event): apply global focus styling (VIV-2327) (#2307)
* chore(calendar-event): add global focus styling * add white/black outline for overlapping events * fix call-lint error * update ui tests snapshots
1 parent 0f07bb8 commit beb3230

File tree

4 files changed

+13
-2
lines changed

4 files changed

+13
-2
lines changed

libs/components/src/lib/calendar-event/calendar-event.scss

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
$default: filled
1717
);
1818
@use '../../../../shared/src/lib/sass/mixins/appearance' as appearance;
19+
@use '../../../../shared/src/lib/sass/mixins/focus' as focus;
20+
@use '../../../../shared/src/lib/sass/mixins/focus' as focus-variables;
1921

2022
:host {
2123
display: contents;
@@ -55,6 +57,7 @@
5557
#{variables.$indent}: calc(
5658
0px + var(#{variables.$overlap-count}, 0) * #{$unit-indent}
5759
);
60+
#{focus-variables.$focus-stroke-gap-color}: transparent;
5861

5962
position: absolute;
6063
z-index: var(#{variables.$overlap-count});
@@ -85,9 +88,17 @@
8588
}
8689

8790
&:focus {
91+
@include focus.focus;
92+
8893
z-index: 2000;
89-
filter: var(#{constants.$vvd-shadow-surface-8dp});
90-
outline: none;
94+
}
95+
:host([overlap-count]) & {
96+
#{focus-variables.$focus-stroke-gap-color}: var(
97+
#{constants.$vvd-color-canvas}
98+
);
99+
}
100+
:host([overlap-count]) &:not(:focus) {
101+
box-shadow: inset 0 0 0 1px var(#{constants.$vvd-color-canvas});
91102
}
92103
}
93104

0 commit comments

Comments
 (0)