[components]: replace resize handler with container queries
@MapTo0 is already working on this.
Since Jan 8, 2025.
- Dominant language
- TypeScript
- Stars
- 1.8k
- Forks
- 285
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 59
Description
Feature Request Description
Currently, every component that has responsive paddings or visualization based on a specific breakpoint apply class / attribute to the corresponding size and this class / attribute is used to style the component. Usually this class / attribute rely on the component width, where width is observed by resize handler in order to detect changes.
With current issue we want to start to use container queries. Container queries enable you to apply styles to an element based on the size of the element's container.
Motivation
There is issue (https://github.com/SAP/ui5-webcomponents/issues/5774) that reports flickering when the components are resized and it will increase the performance of the components.
Reference
Following PR (https://github.com/SAP/ui5-webcomponents/pull/7665) can be used for reference how responsive styles of component should be migrated to content queries from resize handler
Resources
To be addressed
- PopupCommons styles
- Wizard
- ShellBar
- Page
- MediaGallery
- TabContainer
- DynamicSideContent
- IllustratedMessage
- Toolbar
- ProductSwitch
- FlexibleColumnLayout
Note: Some components might be missed so fill the list if some component is missing
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.