Skip to content

docs-bug(mat-form-field): Appearance of components is altered by the documentation styling itself #25510

@skopekreep

Description

@skopekreep

Documentation Feedback

Investigating why some of my app's Angular Material components look different from those in the docs led to the observation that some of the styles from the docs pages themselves were altering the appearance of the Angular Material components embedded within. This is likely unintentional and undesirable and may lead to confusion.

Example

The default font size of the mat-form-field should be 14px, as pictured here in a fresh Aqngular install with a single Material component.
component_in_new_angular_install

But when viewed in the context of the docs, the font size is 16px.
Chrome

This was observed in both Chrome and Safari on Mac.

It looked like, at least in one case, that the <p> tag styling of the docs was being inherited by the mat-form-field. There may be a more thorough explanation, but I believe this illustrates the issue in a verifiable and reproducible way.

Additional Notes

This same issue seems to be affecting mat-input (https://material.angular.io/components/input/overview) as well, and possibly others.

Affected documentation page

https://material.angular.io/components/form-field/overview

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsThis issue is related to documentationneeds triageThis issue needs to be triaged by the team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions