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

fix(material-experimental/mdc-form-field): fix outline notch width #23005

Merged
merged 2 commits into from Sep 14, 2021

Commits on Sep 10, 2021

  1. fix(material-experimental/mdc-form-field): fix outline notch width

    This commit fixes a couple of issues that have been introduced
    by accident over time:
    
    1. The outline notch width is incorrectly calculated since
       angular#21676. This happens
       because we manually override the label's typography level to `body1`
       but didn't account for the `font-size` set by the `notched-outline`.
       This resulted in the computed label width being incorrect.
    
    2. angular#22089 added `line-height:
       0` to fix textarea's accidentally expanding the infix vertically.
       This breaks custom controls and their alignment. Textarea's behave a
       little different compared to a native input, and the actual fix seems
       to be to fix the alignment from `top` to `middle` so that the infix
       does not try to add additional padding (due to the inherited `body1`
       line-height and to satisfy `min-height`). Example:
       https://jsfiddle.net/rpvm4bkL/6/.
    
    3. Typography has been moved with
       angular#21676 to the
       input control (notice how `font: inherit` is removed too). This
       breaks custom form controls that rely on the typography provided
       by the form-field (these controls would just inherit typography)
    
    4. Not an actual fix, but a cleanup since 21ab17f
      added a class to avoid styles from the form-field leaking into
      standalone inputs. The class has been updated to be more specific that
      it only matches form-control inputs, and not _any_ type of form
      control.
    devversion committed Sep 10, 2021
    Copy the full SHA
    707efb6 View commit details
    Browse the repository at this point in the history

Commits on Sep 14, 2021

  1. fix(material-experimental/mdc-form-field): increase specificity of `l…

    …ine-height: normal` on the floating label
    mmalerba committed Sep 14, 2021
    Copy the full SHA
    aac6264 View commit details
    Browse the repository at this point in the history