Skip to content

MatSpinner is unaffected by transform: translate() #16981

@hodossy

Description

@hodossy

Reproduction

Example: https://components-issue-v63m7m.stackblitz.io

Resize the window to see that the top left corner of the spinner is in the center.

Steps to reproduce:

  1. Have an absolutely positioned element with a spinner inside:
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
  1. Apply the following css:
position: relative;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);

Expected Behavior

Spinner is properly centered

Actual Behavior

Translate is not affecting the spinner

Environment

  • Angular: 8.2.4
  • CDK/Material: 8.1.4
  • Browser(s): Chrome 76
  • Operating System (e.g. Windows, macOS, Ubuntu): Windows 10

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions