Skip to content

[skeleton] variant=text wrong size #18170

@Mangatt

Description

@Mangatt

I suppose that text skeleton should be 1:1 size to real text that he is replacing. Right now, size is way off.

  • The issue is present in the latest release.
  • I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 😯

Size of text skeleton is wrong.

Expected Behavior 🤔

Size of text skeleton should be equal to size of replaced text.

Steps to Reproduce 🕹

https://codesandbox.io/s/create-react-app-7y24f

To work as expected, there has to be 2 changes:

  1. Add   as skeleton children
  2. Change component CSS to:
height: 'auto',
marginTop: 0,
marginBottom: 0,
transformOrigin: '0 65%',
transform: 'translateZ(0) scale(1, 0.65)',
textIndent: -999,
borderRadius: theme.shape.borderRadius,

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueGreat for first contributions. Enable to learn the contribution process.scope: skeletonChanges related to the skeleton.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions