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/icon): mat-icon misaligned when text-spacing is applied #29686

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Commits on Nov 20, 2024

  1. fix(material/icon): mat-icon misaligned when text-spacing is applied

    Fixes an issue with Angular Components Material Icon component where
    when text-spacing is applied the icon gets misaligned and if inside
    of an input or container with an outline, the icon gets cut off.
    This fix adds css styling  to keep the icon
    middle-aligned when text-spacing is applied.
    
    Fixes b/250063405
    essjay05 committed Nov 20, 2024
    Configuration menu
    Copy the full SHA
    6680bd5 View commit details
    Browse the repository at this point in the history
  2. fix(material/icon): changes overflow to visible for button icon

    Updates styles for Angular Material Icon so when the icon is
    within a button it sets the overflow to visible to avoid the
    icon from being cutoff. Also updates the line-height to 1 set
    
    Fixes b/250063405
    essjay05 committed Nov 20, 2024
    Configuration menu
    Copy the full SHA
    b70c2c3 View commit details
    Browse the repository at this point in the history
  3. refactor(material/icon): moves styles to bottom of scss file

    Updates previous fix to move added styles to bottom of scss
    file for overriding.
    
    Fixes b/250063405
    essjay05 committed Nov 20, 2024
    Configuration menu
    Copy the full SHA
    a8181ca View commit details
    Browse the repository at this point in the history
  4. fix(material/icon): updates to include .mat-icon variants

    Updates classes to target .mat-icon usage in other Angular
    Material Components (ie. list-item, list-option, grid-tile,
    form-field, tab, toolbar, and tooltip).
    
    Fixes b/250063405
    essjay05 committed Nov 20, 2024
    Configuration menu
    Copy the full SHA
    ccc4e36 View commit details
    Browse the repository at this point in the history
  5. fix(material/icon): added styling for icon to ignore text-spacing

    Updates previous fix to target  instances where its
    parent element has  or  applied to
    it and to override any , , or
     changes to the  so it should stay the same.
    
    Fixes b/250063405
    essjay05 committed Nov 20, 2024
    Configuration menu
    Copy the full SHA
    4bbc5a9 View commit details
    Browse the repository at this point in the history
  6. refactor(material/icon): fixed lint errors

    Updates previous fix to Angular Material Icon component to
    abide by the lint formatting.
    
    Fixes b/250063405
    essjay05 committed Nov 20, 2024
    Configuration menu
    Copy the full SHA
    ffe3df3 View commit details
    Browse the repository at this point in the history
  7. refactor(material/icon): consolidate styles to ignore text-spacing

    Updates previous change to consolidate the important styles that
    were added to ignore any externally placed text-spacing styles
    be added to be targeted by all .mat-icon situations.
    
    Fixes b/250063405
    essjay05 committed Nov 20, 2024
    Configuration menu
    Copy the full SHA
    885f117 View commit details
    Browse the repository at this point in the history
  8. refactor(material/icon): removes important and inline styles

    Updates previous fix to remove the inline targets and the usage
    of forced usage of styles as it is on the app to remove any
    overriding styles.
    
    Fixes b/250063405
    
    BREAKING CHANGE: removes use of forced styles
    
    Updates the previous fix which uses "important" and removes it
    as any overrides should be fixed by the app mat-icon is used in
    instead.
    essjay05 committed Nov 20, 2024
    Configuration menu
    Copy the full SHA
    3566c44 View commit details
    Browse the repository at this point in the history
  9. fix(material/icon): hides .mdc-button .mat-icon on mobile screens

    Updates previous fix by updating documentation on the usage of
    mat-icon within mdc-button to notify developers that mat-icon
    is set to be hidden on mobile/xsmall screens to improve
    accessibility and recommends the usage of aria-label or
    aria-labelledby to notify screenreaders of the information that
    mat-icon is supposed to convey.
    
    Fixes b/250063405
    essjay05 committed Nov 20, 2024
    Configuration menu
    Copy the full SHA
    117af69 View commit details
    Browse the repository at this point in the history
  10. refactor(material/icon): simplifies icon style changes

    Updates previous changes to icon.scss to remove unnecessary
    specificity targeting and just moves classes to be generalized
    under .mat-icon. Adds min-height and min-width to .mdc-button
    so that when buttons (with icons especially) do not allow its
    content to overflow outside of the button and maintaining its
    accessibility by not allowing overlapping of text/content.
    
    Fixes b/250063405
    essjay05 committed Nov 20, 2024
    Configuration menu
    Copy the full SHA
    065b025 View commit details
    Browse the repository at this point in the history
  11. refactor(material/icon): provides context for undoing previous fix

    Updates notation to style change in icon.scss which undoes a previous
    bug fix for GH issue angular#11826. As this change is now deemed as an
    accessibility issue due to it being cut off/hidden.
    
    Fixes b/250063405
    
    BREAKING CHANGE: undoes hiding icon overflow
    
    Reverts icon having its overflow visible to be more accessible.
    essjay05 committed Nov 20, 2024
    Configuration menu
    Copy the full SHA
    feb69bf View commit details
    Browse the repository at this point in the history
  12. refactor(material/icon): changes method of making icon visible with t…

    …ext-spacing
    
    Updates previous fix to revert removal of overflow: hidden to remove the breaking
    change and updates the method of ensuring .mat-icon remains visible by applying
    flex-shrink to it so the icon does not get cut off and improves accessibility.
    
    Fixes b/250063405
    essjay05 committed Nov 20, 2024
    Configuration menu
    Copy the full SHA
    a61c8b7 View commit details
    Browse the repository at this point in the history
  13. refactor(material/icon): fix formatting

    Updates previous change to fix formatting for lint errors.
    essjay05 committed Nov 20, 2024
    Configuration menu
    Copy the full SHA
    7a2a1e1 View commit details
    Browse the repository at this point in the history
  14. refactor(material/icon): update height to min-height .mat-icon

    Updates previous fix to change .mat-mdc-button-base .mat-icon
    from height: min-content to min-height: min-content to avoid
    overriding the default .mat-icon height: 24px. This way it
    defaults to min-content if the height becomes smaller than the
    24px.
    
    Fixes b/250063405
    essjay05 committed Nov 20, 2024
    Configuration menu
    Copy the full SHA
    6eedec6 View commit details
    Browse the repository at this point in the history