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

Add contain strict for elements with fully managed layout #506

Merged
merged 1 commit into from Jan 3, 2023

Conversation

krassowski
Copy link
Member

Closes #504

Uses strict CSS containment on elements with fully managed layout (absolutely positioned elements that specify all coordinates and dimensions, e.g. top + left + width + height, or top + left + bottom + right) to reduce layout cost (improves performance for resizing certain elements and other actions).

This requires that nothing within the widgets paints outside of it. Some modest changes may be needed downstream to remove painting outside of the widget box, as in jupyterlab/jupyterlab#13671.

The added contain can be overridden in sub-classes of LayoutItem.

I would suggest that we merge this, cut a release, pull it in JupyterLab and run full test suite (once jupyterlab/jupyterlab#13671 is in) to see if it causes any side-effects (I did not notice any in manual testing).

I would suggest that we do not backport this to 1.x and instead include a tailored solution in JupyterLab (I will prepare a PR).

coordinates and dimensions (top/left/width/height or top/left/bottom/right)
Copy link
Member

@fcollonval fcollonval left a comment

Choose a reason for hiding this comment

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

Thanks @krassowski

Merging a cutting a v2 alpha release

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request performance Addresses performance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Containers with managed size and position should use contain:strict
2 participants