Skip to content

Commit 9603468

Browse files
authored
chore(styles): use standard styles for scrollbar (#461)
- Uses only standard css for scrollbar. - This change allows us to use the Fluent `useScrollbarWidth` hook if needed.
1 parent e8460e3 commit 9603468

File tree

1 file changed

+2
-17
lines changed

1 file changed

+2
-17
lines changed

styles/src/static/static.styles.ts

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,9 @@ import { makeStaticStyles, tokens } from "@fluentui/react-components";
22

33
const scrollbarColor = tokens.colorScrollbarOverlay;
44

5-
const isFirefox = window.navigator.userAgent.includes("Fire");
65
export const useScrollStaticStyles = makeStaticStyles({
76
"*": {
8-
// Firefox
9-
// Scrollbar styling is amazingly complex. Read more here:
10-
// https://stackoverflow.com/questions/6165472/custom-css-scrollbar-for-firefox
11-
scrollbarWidth: isFirefox ? "thin" : "unset",
12-
scrollbarColor: isFirefox ? `${scrollbarColor} transparent` : "auto",
13-
},
14-
"*::-webkit-scrollbar": {
15-
width: tokens.spacingHorizontalSNudge,
16-
height: tokens.spacingHorizontalSNudge,
17-
},
18-
"*::-webkit-scrollbar-thumb": {
19-
background: scrollbarColor,
20-
borderRadius: tokens.borderRadiusXLarge,
21-
},
22-
"*::-webkit-scrollbar-track": {
23-
background: "none",
7+
scrollbarWidth: "thin",
8+
scrollbarColor: `${scrollbarColor} transparent`,
249
},
2510
});

0 commit comments

Comments
 (0)