floating-vue icon indicating copy to clipboard operation
floating-vue copied to clipboard

`translate3d` render a blurred `PopperContent` view under odd dpr screen, like 125%

Open ssruoyan opened this issue 2 years ago • 1 comments

is it considered to use translate in this case ?

const isOdd = (window.devicePixelRatio || 1) * 100 % 2 === 1
{ transform: isOdd ?`translate(x, y)` : `translate3d(x, y, 0)` }

https://github.com/Akryum/floating-vue/blob/main/packages/floating-vue/src/components/PopperContent.vue#L23

ssruoyan avatar Mar 02 '23 10:03 ssruoyan

Bumping this issue.

The suggested fixes I see in this thread https://github.com/Akryum/floating-vue/issues/233 (disabling gpuAcceleration) look to only be relevant to popper.js not the new floating-ui.

Could we have

{
    transform: gpuAcceleration ? `translate3d(${Math.round(result.x)}px,${Math.round(result.y)}px,0)` : `translate(${Math.round(result.x)}px, ${Math.round(result.y)}px)`
}

Which would be a global opt out with a gpuAcceleration prop to match the old popper.js functionality https://popper.js.org/docs/v2/modifiers/compute-styles/#gpuacceleration

maxswann-nexuspoint avatar Jan 22 '25 11:01 maxswann-nexuspoint