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

Button: change button to an ion-button component #7466

Closed
brandyscarney opened this issue Jul 29, 2016 · 3 comments
Closed

Button: change button to an ion-button component #7466

brandyscarney opened this issue Jul 29, 2016 · 3 comments
Assignees
Milestone

Comments

@brandyscarney
Copy link
Member

brandyscarney commented Jul 29, 2016

This will make it easier for users to have their own custom buttons instead of overriding our styles.

  • <a button> becomes <a ion-button>
  • <button> becomes <button ion-button>
@brandyscarney brandyscarney added this to the 2.0.0-beta.12 milestone Aug 1, 2016
@brandyscarney brandyscarney self-assigned this Aug 8, 2016
@brandyscarney brandyscarney changed the title Button: change button to an ion-button component that wraps a button Button: change button to an ion-button component Aug 8, 2016
@mpaland
Copy link

mpaland commented Aug 9, 2016

@brandyscarney, wouldn't it be cleaner and more consistent to have a <ion-button> element instead of a <button ion-button> like

<ion-button>
  Right Icon
  <ion-icon name="star"></ion-icon>
</ion-button>

This may render a <button ion-button> behind the scenes.

@brandyscarney
Copy link
Member Author

Hey @mpaland, thanks for the suggestion! The short answer is that using an attribute selector rather than an element selector allows us to gain all of the advantages of the native <button> and <a> elements, rather than passing all of the native functionality down and being difficult to maintain. This is something we have decided to do in line with the material team's implementation. They have put together a great document explaining the various reasons for this: https://docs.google.com/document/d/1m8IxhKu5qI8xwjePVGZMbRve3MTW9M8odgcPiuAZfoM/preview?pref=2&pli=1#

@mpaland
Copy link

mpaland commented Aug 11, 2016

Brandy, thanx for pointing this out. Kara's doc makes your decision pretty clear. IMHO not 100% nice - but necessary.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Sep 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants