Skip to content

Applying body2 styling to the body element causes weird behavior that can't be overriden #17100

@damir-sirola

Description

@damir-sirola
  • 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 😯

All body2 styling is applied to the body element

Expected Behavior 🤔

Not applying all body2 styling to the body element

Steps to Reproduce 🕹

Steps:

  1. In the theme, specify any styling for body2 component (for example overflow: hidden;)
  2. overflow: hidden; is applied to the body tag

Context 🔦

This issue caused us to have to remove CssBaseline that we used because of hidden dependency on body2 typography styling and fall back to specifying css overrides / base styling through styled-components.
It would be a good idea to mention this in the documentation in migrating from v3 to v4 article as it's a breaking change.

Your Environment 🌎

Tech Version
Material-UI v4.3.3
React 16.9.0
Browser N/A
TypeScript 3.5.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    breaking changeIntroduces changes that are not backward compatible.component: CssBaselineThe React component.type: new featureExpand the scope of the product to solve a new problem.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions