Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "fix: selected indocator position in vertical tablist",
"packageName": "@fluentui/web-components",
"email": "machi@microsoft.com",
"dependentChangeType": "patch"
}
16 changes: 9 additions & 7 deletions packages/web-components/src/tablist/tablist.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ export const styles = css`
* TODO: Remove '(text-size-adjust: auto)' after this bug is fixed:
* https://bugs.webkit.org/show_bug.cgi?id=298646
* Also remove the same trick from tab.styles.ts.
* Using '@supports (text-size-adjust: auto)' here to exclude Safari 26 from
* Using '@supports (text-size-adjust: auto)' here to exclude Safari 26.0 from
* using CSS Anchor Positioning here because it crashes.
*/
@supports (anchor-name: --a) and (text-size-adjust: auto) {
Expand All @@ -200,7 +200,8 @@ export const styles = css`
background-color: ${colorCompoundBrandStroke};
content: '';
inline-size: 100%;
inset: auto auto anchor(end) anchor(center);
inset-block: auto anchor(end);
inset-inline: anchor(center) auto;
position: fixed;
position-anchor: --tab;
transform: translateX(-50%);
Expand All @@ -215,8 +216,13 @@ export const styles = css`
height: ${strokeWidthThicker};
}

:host(:dir(rtl))::after {
transform: translateX(50%);
}

:host([orientation='vertical'])::after {
inset: anchor(center) anchor(end) auto 0;
inset-block: anchor(center) auto;
inset-inline: anchor(start) auto;
transform: translateY(-50%);
transition-property: inset-block, height;

Expand All @@ -225,10 +231,6 @@ export const styles = css`
height: calc(anchor-size() - var(--tabIndicatorInsetBlock) * 2);
}

:host(:dir(rtl)[orientation='vertical'])::after {
inset: anchor(center) anchor(start) auto 0;
}

:host([disabled])::after {
background-color: ${colorNeutralForegroundDisabled};
}
Expand Down
Loading