Skip to content

Commit 874a430

Browse files
committed
refactor(topbar): make active button tint inline as plain css
Signed-off-by: Dhruv Arora <dhruv.arora1@autodesk.com>
1 parent 8ce8109 commit 874a430

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

fission/src/ui/components/topbar/TopBarConfig.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,11 @@ export const TOP_BAR_ICON_BUTTON_SX = {
1212
"&:focus, &:focus-visible": { outline: "none" },
1313
} as const
1414

15-
const tintedCurrentColor = (percent: number) => `color-mix(in srgb, currentColor ${percent}%, transparent)`
16-
17-
/** The tints resolve against the `color` below - keep the two together. */
1815
export const TOP_BAR_ICON_BUTTON_ACTIVE_SX = {
1916
borderRadius: 1,
2017
color: "primary.main",
21-
backgroundColor: tintedCurrentColor(16),
22-
"&:hover": { backgroundColor: tintedCurrentColor(24) },
18+
backgroundColor: "color-mix(in srgb, currentColor 16%, transparent)",
19+
"&:hover": { backgroundColor: "color-mix(in srgb, currentColor 24%, transparent)" },
2320
} as const
2421

2522
// making react-icon glyph consistent with buttons

0 commit comments

Comments
 (0)