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

Starter app is janky after adding Angular Material #16966

Closed
2 of 15 tasks
andrewseguin opened this issue Feb 13, 2020 · 1 comment · Fixed by #17003
Closed
2 of 15 tasks

Starter app is janky after adding Angular Material #16966

andrewseguin opened this issue Feb 13, 2020 · 1 comment · Fixed by #17003

Comments

@andrewseguin
Copy link

🐞 Bug report

Command

  • new
  • build
  • serve
  • test
  • e2e
  • generate
  • add
  • update
  • lint
  • xi18n
  • run
  • config
  • help
  • version
  • doc

Is this a regression?

Yes

Description

A newly generated application using ng new will have several UI issues once you install ng add @angular/material.

This is because Angular Material will add the following styles to the global stylesheet:

html, body { height: 100%; }
body { margin: 0; font-family: Roboto, "Helvetica Neue", sans-serif; }

This causes an issue with the header, which has margin: -8px since it assumes the body has margin: 8px.

Once Angular Material adds it's boilerplate styles, the page exhibits wild scrolling jank whenever you hover over any button on the page.

🔬 Minimal Reproduction

ng new my-example-app
cd my-example-app
ng add @angular/material
ng serve

🌍 Your Environment


Angular CLI: 9.0.2
Node: 12.14.1
OS: linux x64

Angular: 9.0.1
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... routerIvy Workspace: Yes

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.900.2
@angular-devkit/build-angular     0.900.2
@angular-devkit/build-optimizer   0.900.2
@angular-devkit/build-webpack     0.900.2
@angular-devkit/core              9.0.2
@angular-devkit/schematics        9.0.2
@angular/cdk                      9.0.0
@angular/cli                      9.0.2
@angular/material                 9.0.0
@ngtools/webpack                  9.0.2
@schematics/angular               9.0.2
@schematics/update                0.900.2
rxjs                              6.5.4
typescript                        3.7.5
webpack                           4.41.2
@ngbot ngbot bot modified the milestone: Backlog Feb 13, 2020
@filipesilva filipesilva modified the milestones: Backlog, 9.0.x Feb 14, 2020
sacgrover added a commit to sacgrover/angular-cli that referenced this issue Feb 17, 2020
Starter app is janky after adding Angular Material
::ng-deep is deprecated but that's only solution we can use for now from template.  It should be removed when ::ng-deep will be removed from angular. 
Fixes angular#16966
sacgrover added a commit to sacgrover/angular-cli that referenced this issue Feb 18, 2020
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Mar 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants