Skip to content
This repository was archived by the owner on Mar 4, 2020. It is now read-only.
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 CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
- Accessibility improvements for `tree` and `splitButton` @kolaps33 ([#2032](https://github.com/stardust-ui/react/pull/2032))
- Update color scheme values in Teams theme @codepretty ([#2063](https://github.com/stardust-ui/react/pull/2063))
- Fixing a core keydown disconnect issue @dzearing ([#2056](https://github.com/stardust-ui/react/pull/2056))
- Fix blurry content of Popup @jurokapsiar ([#2067](https://github.com/stardust-ui/react/pull/2067))

### Features
- Add `menu` prop on `ToolbarMenuItem` component @mnajdova ([#1984](https://github.com/stardust-ui/react/pull/1984))
Expand Down
7 changes: 7 additions & 0 deletions packages/react/src/lib/positioner/Popper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,13 @@ const Popper: React.FunctionComponent<PopperProps> = props => {
const modifiers: PopperJS.Modifiers = _.merge(
{ preventOverflow: { padding: 0 } },
{ flip: { padding: 0, flipVariationsByContent: true } },
/**
* This prevents blurrines in chrome, when the coordinates are odd numbers
* alternative would be to use `fn`, call _PopperJS.default.Defaults.modifiers.computeStyle.fn(data, options)
* and manipulate the computeed style or ask popper to fix it
* but since there is presumably only handful of poppers displayed on the page, the performance impact should be minimal
*/
{ computeStyle: { gpuAcceleration: false } },
/**
* When the popper box is placed in the context of a scrollable element, we need to set
* preventOverflow.escapeWithReference to true and flip.boundariesElement to 'scrollParent' (default is 'viewport')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const toolbarMenuItemStyles = {
})

return {
position: 'relative',
color: v.menuItemForeground || colors.foreground1,
borderWidth: v.menuBorderWidth,
backgroundColor: 'transparent',
Expand All @@ -22,7 +23,6 @@ const toolbarMenuItemStyles = {
maxWidth: '100%',
padding: v.menuItemPadding,
cursor: 'pointer',
position: 'relative',

':focus': {
outline: 0,
Expand All @@ -47,15 +47,15 @@ const toolbarMenuItemStyles = {
},

activeIndicator: ({ variables: v }): ICSSInJSStyle => ({
float: 'right',
position: 'fixed',
position: 'absolute',
right: pxToRem(7),
top: pxToRem(7),
}),

submenuIndicator: ({ variables: v }): ICSSInJSStyle => ({
float: 'right',
position: 'fixed',
position: 'absolute',
right: pxToRem(7),
top: pxToRem(7),
}),

wrapper: () => ({
Expand Down