Skip to content

Commit 2a5e856

Browse files
authored
fix(ObjectStatus): update inverted focus styles (#7884)
Fixes #7883
1 parent 8abe41a commit 2a5e856

File tree

1 file changed

+29
-6
lines changed

1 file changed

+29
-6
lines changed

packages/main/src/components/ObjectStatus/ObjectStatus.module.css

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,30 @@
239239
}
240240

241241
&.active:focus {
242-
outline: var(--sapContent_FocusColor) var(--sapContent_FocusStyle) var(--sapContent_FocusWidth);
242+
outline: none;
243+
&::after {
244+
outline: none;
245+
content: '';
246+
position: absolute;
247+
box-sizing: border-box;
248+
inset: calc(-1 * var(--sapButton_BorderWidth));
249+
pointer-events: none;
250+
box-shadow:
251+
inset 0 0 0 0.125rem var(--sapContent_FocusColor),
252+
inset 0 0 0 0.1875rem var(--sapContent_ContrastFocusColor);
253+
border-radius: inherit;
254+
height: calc(100% + 2 * var(--sapButton_BorderWidth));
255+
}
256+
}
257+
}
258+
259+
/*deltas*/
260+
[data-sap-theme^='sap_'][data-sap-theme$='_hcw'] .inverted.active:focus,
261+
[data-sap-theme^='sap_'][data-sap-theme$='_hcb'] .inverted.active:focus {
262+
outline: var(--sapContent_FocusColor) var(--sapContent_FocusStyle) var(--sapContent_FocusWidth);
263+
outline-offset: var(--sapButton_BorderWidth);
264+
&::after {
265+
content: none;
243266
}
244267
}
245268

@@ -385,7 +408,7 @@
385408
.objectStatus:is(.inverted):is(.negative, .critical, .positive, .information, .none) {
386409
color: var(--_ui5wcr-ObjectStatus-inverted-vs-text-color);
387410
background: var(--_ui5wcr-ObjectStatus-inverted-vs-background-color);
388-
border: 0.0625rem solid var(--_ui5wcr-ObjectStatus-inverted-vs-border-color);
411+
border: var(--sapButton_BorderWidth) solid var(--_ui5wcr-ObjectStatus-inverted-vs-border-color);
389412

390413
[ui5-icon] {
391414
color: var(--_ui5wcr-ObjectStatus-inverted-vs-text-color);
@@ -394,7 +417,7 @@
394417
&.active:hover {
395418
color: var(--_ui5wcr-ObjectStatus-inverted-vs-hover-text-color);
396419
background: var(--_ui5wcr-ObjectStatus-inverted-vs-hover-background-color);
397-
border: 0.0625rem solid var(--_ui5wcr-ObjectStatus-inverted-vs-hover-border-color);
420+
border: var(--sapButton_BorderWidth) solid var(--_ui5wcr-ObjectStatus-inverted-vs-hover-border-color);
398421

399422
[ui5-icon] {
400423
color: var(--_ui5wcr-ObjectStatus-inverted-vs-hover-text-color);
@@ -405,7 +428,7 @@
405428
text-shadow: var(--sapContent_TextShadow);
406429
color: var(--_ui5wcr-ObjectStatus-inverted-vs-active-text-color);
407430
background: var(--_ui5wcr-ObjectStatus-inverted-vs-active-background-color);
408-
border: 0.0625rem solid var(--_ui5wcr-ObjectStatus-inverted-vs-active-border-color);
431+
border: var(--sapButton_BorderWidth) solid var(--_ui5wcr-ObjectStatus-inverted-vs-active-border-color);
409432

410433
[ui5-icon] {
411434
color: var(--_ui5wcr-ObjectStatus-inverted-vs-active-text-color);
@@ -685,7 +708,7 @@
685708
text-shadow: var(--sapContent_ContrastTextShadow);
686709
color: var(--_ui5wcr-ObjectStatus-inverted-indication-text-color);
687710
background-color: var(--_ui5wcr-ObjectStatus-inverted-indication-background-color);
688-
border: 0.0625rem solid var(--_ui5wcr-ObjectStatus-inverted-indication-border-color);
711+
border: var(--sapButton_BorderWidth) solid var(--_ui5wcr-ObjectStatus-inverted-indication-border-color);
689712

690713
[ui5-icon] {
691714
color: var(--_ui5wcr-ObjectStatus-inverted-indication-text-color);
@@ -699,7 +722,7 @@
699722
text-shadow: var(--sapContent_TextShadow);
700723
color: var(--_ui5wcr-ObjectStatus-inverted-indication-active-text-color);
701724
background: var(--_ui5wcr-ObjectStatus-inverted-indication-active-background-color);
702-
border: 0.0625rem solid var(--_ui5wcr-ObjectStatus-inverted-indication-active-border-color);
725+
border: var(--sapButton_BorderWidth) solid var(--_ui5wcr-ObjectStatus-inverted-indication-active-border-color);
703726

704727
[ui5-icon] {
705728
color: var(--_ui5wcr-ObjectStatus-inverted-indication-active-text-color);

0 commit comments

Comments
 (0)