Skip to content

md-icon as input prefix / prefix on wide inputs  #2586

Closed

Description

@fxck

currently this happens when you try to use md-icon in a prefix
image

there two issues

  1. icon is too big, which messes with input's alignment
    image

  2. icon is too wide, which messes with display: table-cell and pushes the input unreasonably far right

should this even supported? I could work on it I guess

also why is table cell used instead of flex? it's hacky and puts way too much space around prefix even if I used $(if my md-input is wide)
image

Activity

  1. changed the title [-]md-icon as input prefix[/-] [+]md-icon as input prefix / prefix on wide inputs [/+] on Jan 10, 2017
  2. crisbeto commented on Jan 10, 2017

    @crisbeto
    Member

    In regards to flexbox, I agree that it would be better to use. Otherwise I think that #2496 may fix this issue in particular.

  3. fxck commented on Jan 10, 2017

    @fxck
    ContributorAuthor

    it will probably fix the stretching(but I think it would still be worth converting it to flex instead), but not the vertical alignment

  4. added
    P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
    on Jan 27, 2017
  5. kara commented on Mar 4, 2017

    @kara
    Contributor

    Fixed by #3342

  6. marshall007 commented on Mar 7, 2017

    @marshall007
    Contributor

    @kara @mmalerba the same issue pops up when using md-icon within an md-placeholder. I wasn't sure if I should create a separate issue or if you just want to reopen this one as it's essentially the same bug.

    This is solved by applying the same fix from #3342 to .mat-input-placeholder .mat-icon. Alternatively, it seems that all three cases (prefix/suffix/placeholder) could potentially be handled more generally as .mat-input-container .mat-icon.

  7. marshall007 commented on Mar 8, 2017

    @marshall007
    Contributor

    Upon further investigation, .mat-input-container .mat-icon is almost certainly the way to go in terms of future-proofing. I just noticed md-hint > md-icon has the same issue (and same resolution).

  8. angular-automatic-lock-bot commented on Sep 5, 2019

    @angular-automatic-lock-bot

    This issue has been automatically locked due to inactivity.
    Please file a new issue if you are encountering a similar or related problem.

    Read more about our automatic conversation locking policy.

    This action has been performed automatically by a bot.

  9. locked and limited conversation to collaborators on Sep 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions