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: Ensure fluent2 dark theme isInverted:true, set primary fluent2darktheme button color to match light theme",
"packageName": "@fluentui/fluent2-theme",
"email": "mifraser@microsoft.com",
"dependentChangeType": "patch"
}
3 changes: 3 additions & 0 deletions packages/fluent2-theme/src/componentStyles/Button.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ export function getPrimaryButtonStyles(theme: ITheme): Partial<IButtonStyles> {
description: {
color: semanticColors.primaryButtonText,
},
descriptionHovered: {
color: semanticColors.primaryButtonText,
},
};

return styles;
Expand Down
7 changes: 7 additions & 0 deletions packages/fluent2-theme/src/fluent2WebDarkTheme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { createTheme } from '@fluentui/react';
import { IExtendedEffects, IExtendedSemanticColors } from './types';
import { fluent2ComponentStyles } from './fluent2ComponentStyles';
import { fluent2SharedColors } from './fluent2SharedColors';
import { Fluent2WebLightTheme } from './fluent2WebLightTheme';

const fluent2ForV8DarkEffects: IExtendedEffects = {
elevation4: '0px 2px 4px rgba(0, 0, 0, 0.14), 0px 0px 2px rgba(0, 0, 0, 0.12)',
Expand Down Expand Up @@ -56,6 +57,11 @@ const p = fluent2ForV8DarkPalette;
const grey36 = '#5C5C5C';

const semanticColorMappingOverridesForDark: Partial<IExtendedSemanticColors> = {
// Primary button is unique, it's background color is shared across themes
primaryButtonBackgroundHovered: Fluent2WebLightTheme.palette.themePrimary,
primaryButtonBackgroundPressed: Fluent2WebLightTheme.palette.themeDarker,
primaryButtonBackground: Fluent2WebLightTheme.palette.themeDarkAlt,

// This hex matches the v9 theme.
link: p.themeDark,

Expand Down Expand Up @@ -104,4 +110,5 @@ export const Fluent2WebDarkTheme: ITheme = createTheme({
semanticColors: semanticColorMappingOverridesForDark,
components: fluent2ComponentStyles,
effects: fluent2ForV8DarkEffects,
isInverted: true,
});