Skip to content

Commit

Permalink
fix listbox-option selected indicator position in rtl (#27894)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisdholt committed May 31, 2023
1 parent 23d7cf2 commit 629df3c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "fix listbox-option selected indicator position in RTL instances",
"packageName": "@fluentui/web-components",
"email": "chhol@microsoft.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import {
} from '../design-tokens';
import { typeRampBase } from '../styles/patterns/type-ramp';
import { focusTreatmentBase } from '../styles/focus';
import { DirectionalStyleSheetBehavior } from '../styles/direction';

export const optionStyles: (
context: ElementDefinitionContext,
Expand Down Expand Up @@ -131,6 +132,11 @@ export const optionStyles: (
margin-inline-end: 1ch;
}
`.withBehaviors(
new DirectionalStyleSheetBehavior(null, css`
:host::before {
right: calc((${focusStrokeWidth} - ${strokeWidth}) * 1px);
}
`),
forcedColorsStylesheetBehavior(
css`
:host {
Expand Down

0 comments on commit 629df3c

Please sign in to comment.