angular / angular/components

CDK Overlay - Position Strategy with zoom css on parent

Open
#10,924 20 comments 15 reactions 0 assignees View on GitHub
area: cdk/overlay help wanted P4
Dominant language
TypeScript
Stars
25k
Forks
6.8k
Avg merge
1d 8h
Merged PRs (30d)
91

Description

#### Bug, feature request, or proposal:
If you are using the `zoom` CSS property to scale down UI elements the positioning of the CDK Overlay are calculated incorrectly.

#### What is the expected behavior?
Overlay positions properly as the non-zoomed styled `div`

#### What is the current behavior?
Overlay positions are calculated incorrectly when the `zoom: 0.9` css property is on the parent container.

#### What are the steps to reproduce?
https://stackblitz.com/edit/cdk-overlay-zoom

#### What is the use-case or motivation for changing an existing behavior?
We have a Chrome only application that we use the `zoom` css property to scale down the UI. Using other methods of scaling does not work, so this is what we have to do.

#### Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular - 5.2.10
CDK - 5.2.5

Contributor guide

Open the contributing guide

Research direction

Start with the linked StackBlitz reproduction and compare overlay placement with and without `zoom: 0.9` on the parent. Trace the CDK Overlay positioning entry point and its coordinate calculations, then verify that the overlay aligns with the non-zoomed container in the reproduction.

Written by the indexing model from the issue text.

Assessment

Tech stack
angular, css, typescript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.