Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

md-button: adding ng-href/ui-sref to md-button icon makes the icon placement higher #2440

Closed
junereycasuga opened this issue Apr 21, 2015 · 27 comments
Assignees
Labels
has: Pull Request A PR has been created to address this issue P1: urgent Urgent issues that should be addressed in the next minor or patch release.

Comments

@junereycasuga
Copy link

I'm trying to use md-button with icons to navigate through pages. I tried using both ng-href and ui-sref to give link to it, but by doing that, it makes the position of the icon higher than expected

Example code:

<md-button class="md-icon-button" ui-sref="profile">
    <ng-md-icon icon="profile"></ng-md-icon>
</md-button>

Best regards

@marcysutton
Copy link
Contributor

Hi @junereycasuga, can you provide a Codepen or Plunker showing your code running? What is ng-md-icon?

@marcysutton marcysutton added the needs: demo A CodePen demo or GitHub repository is needed to demonstrate the reproduction of the issue label Apr 24, 2015
@uriva
Copy link

uriva commented May 3, 2015

+1
Plunker: http://plnkr.co/edit/ea0fjAZoODuJK905MDC6?p=preview (ignore the JS)

@ThomasBurleson
Copy link
Contributor

@uriva - I am confused with your Plunkr. There is no md-icon in use.

@uriva
Copy link

uriva commented May 3, 2015

@ThomasBurleson The text is raised in my example, similarly to the icon. I thought these two examples might be the same issue.

@ThomasBurleson ThomasBurleson modified the milestone: 0.10.0 May 13, 2015
@trevor-sonic
Copy link

I have the same issue;
I changed Angular Seed startup application view1 link with md-button.
If I remove href="#/view1" inside md-button; button is lined well, after adding the href (or ng-href) Button rising about 10px

EX:

    <ul class="menu">
        <li><md-button href="#/view1">TAB1</md-button></li>
        <li><a href="#/view2">view2</a></li>
    </ul>

@anderskristian
Copy link

I have the same problem.
I have made a class and add

padding-top: 8px;

Then It works. But it would be nicer to have it "solved" inside the framework.

UPS.... I see my padding solution is not working in all browsers ....

@robertmesserle
Copy link
Contributor

Agreed, this will definitely be solved inside the framework.
On Sun, Jun 7, 2015 at 11:41 AM Anders Kristian Andersen <
notifications@github.com> wrote:

I have the same problem.
I have made a class and add

padding-top: 8px;

Then It works. But it would be nicer to have it "solved" inside the
framework.


Reply to this email directly or view it on GitHub
#2440 (comment).

@cadilhac
Copy link

I'm linking to 1.0 rc4 and I still see this issue.

@mlenser
Copy link

mlenser commented Dec 12, 2015

Still seeing the issue with ui-sref on 1.0 rc7

Switching to anchor in the button fixes it: http://stackoverflow.com/questions/32435358/ui-sref-and-md-button-how-it-works

@nurp
Copy link

nurp commented Dec 12, 2015

With v1.0-rc7, my icons in md-button are misaligned regardless a href, ng-href, ui-sref or without anchor. same, when I use ng-md-icon or md-icon or <icon tag

<md-list>
      <md-list-item ng-repeat="item in admin.tabs track by $index">
          <md-button>
            <i class="material-icons">{{item.icon}}</i>
            {{item.title}}
          </md-button>
    </md-list-item>
</md-list>

@johannesjo
Copy link

Yap doesn't work with 1.0.2 neither.

@james89
Copy link

james89 commented Feb 2, 2016

+1

5 similar comments
@MarkTroutfetter
Copy link

+1

@martineckardt
Copy link
Contributor

+1

@mikila85
Copy link

+1

@Matt-Dionis
Copy link

+1

@andrewshvv
Copy link

+1

@smbowler
Copy link

smbowler commented Apr 9, 2016

+1 any update?

@laurent-grousset
Copy link

+1

1 similar comment
@jalsamn
Copy link

jalsamn commented May 1, 2016

+1

@ThomasBurleson
Copy link
Contributor

@devversion - reopening as this appears to be broken.

@ThomasBurleson ThomasBurleson reopened this May 1, 2016
@ThomasBurleson ThomasBurleson modified the milestones: - Backlog, 0.10.0 May 1, 2016
@ThomasBurleson ThomasBurleson added P4: minor Minor issues. May not be fixed without community contributions. and removed needs: demo A CodePen demo or GitHub repository is needed to demonstrate the reproduction of the issue labels May 1, 2016
@wallzero
Copy link

+1

5 similar comments
@ssamakar
Copy link

+1

@xxmicloxx
Copy link

+1

@salahaldin
Copy link

+1

@anymos
Copy link

anymos commented Jul 25, 2016

+1

@gizmochief7
Copy link

+1

devversion added a commit to devversion/material that referenced this issue Jul 30, 2016
* Currently a normal button is not properly aligning with an anchor button (only when using a flexbox layout parent)
  The buttons should align properly without using flexbox, since those are actually inline-blocks.
  See: http://codepen.io/DevVersion/pen/GqBrYb

* This accounts also for icon buttons. Having a normal icon button and an anchor button makes the icon alignment incorrect and inconsistent.
  See: http://codepen.io/DevVersion/pen/dXjVgQ?editors=1010

Fixes angular#2440.
@devversion devversion added has: Pull Request A PR has been created to address this issue P1: urgent Urgent issues that should be addressed in the next minor or patch release. and removed P4: minor Minor issues. May not be fixed without community contributions. labels Jul 30, 2016
@Splaktar Splaktar removed this from the - Backlog milestone Feb 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
has: Pull Request A PR has been created to address this issue P1: urgent Urgent issues that should be addressed in the next minor or patch release.
Projects
None yet
Development

No branches or pull requests