Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Will-change prevents fixed positioning #3150

Closed
5e-Cleric opened this issue Nov 19, 2023 · 1 comment
Closed

Will-change prevents fixed positioning #3150

5e-Cleric opened this issue Nov 19, 2023 · 1 comment
Labels
blocked Waiting on a dependency, other feature, etc., first solution found A solution exists; just needs to be applied tweak Small, non-breaking change

Comments

@5e-Cleric
Copy link
Member

5e-Cleric commented Nov 19, 2023

Issue description

First of all, this is not a bug, this is a known collision from two CSS properties, and it does not affect the tool in a negative way in its purpose of creating printable documents.

That said, i've been trying to create a sort of sidebar for documents to be seen and shared as links, because i think they can be of use.

image

But the property will-change: transform breaks position:fixed, and renders fixed sidebars impossible to make. I hereby ask for that property to be removed, and an alternative to be considered, if there is one.

Why is it there?

From the official documentation: "The will-change property provides a rendering hint to the user agent, stating what kinds of changes the author expects to perform on the element. This allows the user agent to perform ahead-of-time any optimizations necessary for rendering those changes smoothly, avoiding “jank” when the author does begin changing or animating that feature."

Other arguments to have in mind

  • Good practice, from MDN: "adding will-change directly in a stylesheet implies that the targeted elements are always a few moments away from changing and the browser will keep the optimizations for much longer time than it would have otherwise. So it is a good practice to switch will-change on and off using script code before and after the change occurs."

  • Last resort, from MDN: will-change is intended to be used as a last resort, in order to try to deal with existing performance problems. It should not be used to anticipate performance problems.

@5e-Cleric 5e-Cleric added solution found A solution exists; just needs to be applied tweak Small, non-breaking change labels Jan 16, 2024
@5e-Cleric 5e-Cleric added the blocked Waiting on a dependency, other feature, etc., first label May 28, 2024
@5e-Cleric
Copy link
Member Author

Commented by Calculuschild on gitter chat that the will-change:transform is absolutely necessary for the correct behaviour of the scrolling function on the brew preview. It stays, closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Waiting on a dependency, other feature, etc., first solution found A solution exists; just needs to be applied tweak Small, non-breaking change
Projects
None yet
Development

No branches or pull requests

1 participant