I want to create a button that it identical to Ionic’s native back button, so I set the icon in my custom icon button content to be:
<i class="icon ion-ios7-arrow-back"></i>
ios7-arrow-back is the back icon that Ionic uses, but for some reason the custom button’s icon is much smaller. Since ionic icons use font-size, I tried fiddling with that, but to no avail.
Both the custom and native back button icons are font-size: 13px, but look much different from each other. Attached is a photo (native on top, custom on bottom)
Edit:
Taking a look into ionic.css. It looks like the icons set in buttons are controlled on line 2638: off ionic.css:
Anyone have any ideas on the least-messy way I can change this? It looks like setting a font-size: 17px !important on the custom button class doesn’t do it.
If you want a button to just be an icon with no border or background, do <button class="button button-icon button-clear ion-ios7-arrow-back"></button> - Then no content will be expected inside the button, and the icon will be larger.
I could not get this to work, so I’m assuming this is not what you are suggesting. How would I use your suggested syntax to place a button in the header?
@jererutter Keep in mind that this will work for 0.9.26, but as of 0.9.27 and beyond, you will have to hard code the buttons into each view, Documentation for that should be coming soon, right @andy?
0.9.27 didn’t implement the button changes - but as of nightly and the release coming very soon™, there will big, well-documented, well-reasoned, and easier to use changes with migration guides.