Skip to content

Commit

Permalink
fix(datagrid): use outline token for cell focus (backport to 16.x) (#…
Browse files Browse the repository at this point in the history
…1468)

Backport of #1467 

## PR Checklist

Please check if your PR fulfills the following requirements:

- [ ] Tests for the changes have been added (for bug fixes / features)
- [ ] Docs have been added / updated (for bug fixes / features)
- [ ] If applicable, have a visual design approval

## PR Type

What kind of change does this PR introduce?

<!-- Please check the one that applies to this PR using "x". -->

- [x] Bugfix
- [ ] Feature
- [ ] Code style update (formatting, local variables)
- [ ] Refactoring (no functional changes, no api changes)
- [ ] Build related changes
- [ ] CI related changes
- [ ] Documentation content changes
- [ ] Other... Please describe:

## What is the current behavior?
Focus outline for datagrid cells is not visible in firefox browser.

Issue Number: CDE-2124

## What is the new behavior?
Using object interaction outline token to show the focus for all
browsers.

## Does this PR introduce a breaking change?

- [ ] Yes
- [x] No

<!-- If this PR contains a breaking change, please describe the impact
and migration path for existing applications below. -->

## Other information
  • Loading branch information
valentin-mladenov authored Jul 3, 2024
1 parent 48a7e15 commit 1825d8e
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions projects/angular/src/data/datagrid/_datagrid.clarity.scss
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,13 @@
border: none;

&:focus {
outline: -webkit-focus-ring-color solid variables.$clr_baselineRem_2px;
@include mixins.css-var(
outline,
cds-alias-object-interaction-outline,
Highlight solid variables.$clr_baselineRem_2px,
variables.$clr-use-custom-properties
);
outline-color: -webkit-focus-ring-color;
outline-offset: -(variables.$clr_baselineRem_2px);
}

Expand Down Expand Up @@ -999,7 +1005,13 @@
}

&:focus {
outline: -webkit-focus-ring-color solid variables.$clr_baselineRem_2px;
@include mixins.css-var(
outline,
cds-alias-object-interaction-outline,
Highlight solid variables.$clr_baselineRem_2px,
variables.$clr-use-custom-properties
);
outline-color: -webkit-focus-ring-color;
outline-offset: -(variables.$clr_baselineRem_2px);
}

Expand Down

0 comments on commit 1825d8e

Please sign in to comment.