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
1 change: 1 addition & 0 deletions packages/fluentui/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
- Remove `rotate(360deg)` from `PopupContent` content styles @yuanboxue-amber ([#24432](https://github.com/microsoft/fluentui/pull/24432))
- Fix `FocusZone` to reset tabindex when focus is outside the zone with prop `shouldResetActiveElementWhenTabFromZone` @yuanboxue-amber ([#24463](https://github.com/microsoft/fluentui/pull/24463))
- Change `useLayoutEffect` in `Dropdown` to `useIsomorphicLayoutEffect` @marwan38 ([#24559](https://github.com/microsoft/fluentui/pull/24559))
- Fix styling mutation when merging themes in `Dropdown` @petrjaros ([#24787](https://github.com/microsoft/fluentui/pull/24787))

### Performance
- Avoid memory trashing in `felaExpandCssShorthandsPlugin` @layershifter ([#24663](https://github.com/microsoft/fluentui/pull/24663))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ const transparentColorStyle: ICSSInJSStyle = {
borderBottomColor: 'transparent',
};

const transparentColorStyleObj: ICSSInJSStyle = {
const createTransparentColorStyleObj = (): ICSSInJSStyle => ({
...transparentColorStyle,
':hover': transparentColorStyle,
':active': transparentColorStyle,
':hover': { ...transparentColorStyle },
':active': { ...transparentColorStyle },
':focus': {
...transparentColorStyle,
':active': transparentColorStyle,
':active': { ...transparentColorStyle },
},
};
});

const getWidth = (p: DropdownStylesProps, v: DropdownVariables): string => {
if (p.fluid) {
Expand Down Expand Up @@ -99,7 +99,7 @@ export const dropdownStyles: ComponentSlotStylesPrepared<DropdownStylesProps, Dr
getBorderFocusStyles({ variables: siteVariables })[':focus-visible']),
}),
...(p.inline && {
...transparentColorStyleObj,
...createTransparentColorStyleObj(),
alignItems: 'center',
}),
...(p.inverted && {
Expand Down Expand Up @@ -156,7 +156,7 @@ export const dropdownStyles: ComponentSlotStylesPrepared<DropdownStylesProps, Dr
overflow: 'hidden',
boxShadow: 'none',
minHeight: pxToRem(32),
...transparentColorStyleObj,
...createTransparentColorStyleObj(),
margin: '0',
justifyContent: 'left',
padding: v.comboboxPaddingButton,
Expand All @@ -172,10 +172,10 @@ export const dropdownStyles: ComponentSlotStylesPrepared<DropdownStylesProps, Dr
height: '100%',
}),
}),
...transparentColorStyleObj,
...createTransparentColorStyleObj(),
':focus': {
color: v.color,
...transparentColorStyleObj,
...createTransparentColorStyleObj(),
},
':focus-visible': {
color: v.color,
Expand Down