Skip to content

[EuiAccordion] Replace translateZ with will-change#5806

Merged
thompsongl merged 2 commits intoelastic:mainfrom
thompsongl:3548-accordion
Apr 20, 2022
Merged

[EuiAccordion] Replace translateZ with will-change#5806
thompsongl merged 2 commits intoelastic:mainfrom
thompsongl:3548-accordion

Conversation

@thompsongl
Copy link
Copy Markdown
Contributor

@thompsongl thompsongl commented Apr 15, 2022

Summary

Closes #3548

Using translateZ causes any position: fixed; content to render in the wrong location.
My guess is that transform: translatez(0); was used to either 1) force hardware acceleration of transition effects or 2) resolve rendering a bug in an old/unsupported browser.
If the latter, we're no longer affected. If the former, we can achieve hardware acceleration with will-change: opacity;; the other values are nice-to-haves in this case.

It's also very possible that we don't need to engage the GPU at all and even transform: translatez(0); was a preoptimization. In that case, we can remove will-change, too, but the current method will render more similarly to using translateZ.

Screen.Recording.2022-04-15.at.2.37.32.PM.mov

Checklist

  • Checked in Chrome, Safari, Edge, and Firefox
  • Checked for breaking changes and labeled appropriately
  • A changelog entry exists and is marked appropriately

@kibanamachine
Copy link
Copy Markdown

Preview documentation changes for this PR: https://eui.elastic.co/pr_5806/

@elizabetdev elizabetdev self-requested a review April 19, 2022 17:16
Copy link
Copy Markdown
Contributor

@elizabetdev elizabetdev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 🎉

Tested locally in Chrome, Safari, Firefox, and Edge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[EuiDragDrop] Draggable is way out of the context when start dragging

3 participants