Add icon link classes?
I'm working with BS3 and I am trying to create an inline list of icon links (for post actions using single glyphicons as the icons for actions like edit, delete, reply, quote, etc).
The existing btn-link classes almost work for me but I really don't want these links to look like buttons, but icons. I do want to control the colors like btn-primary, btn-success, etc.
Unless I missed BS3 styles to do this, I'd like to request you add some classes like icon-link, icon-primary, icon-success, etc that can be added to an <a> tag to color and size the link. :hover would not have underline and the link color would darken appropriately.
I would also like to be able to color my text links so maybe the colors should use new link-primary, link-success, etc.
Example Markup:
<a href="#" class="icon-link icon-primary icon-small" title="Move to Trash">
<i class="glyphicon glyphicon-trash"></i>
</a>
Couldn't you just use text-danger or text-success? What from the btn class do you want which isn't fullfilled by the btn-link?
The text-* styles do work in my case except that I have to customize to remove the text-decoration on hover. I don't want an underline to appear when hovering over an icon link.
So, I guess this issue can be closed. Note that the text-* classes are missing .text-primary which should probably be added to be consistent with btn-primary. I'm using btn-primary a lot. I have added a local .text-primary to my css just to make the icon links look right in certain places.
If i stand correct you would like glyphicons inherit color from a class like primary etc?
As I commented above, the text-* styles do work for color (except for the missing text-primary class). I was also concerned about the text-decoration which is underline for text-* styles and not none for icon links. For me, I am okay extending the text-* classes to have the proper text-decoration when used in an icon link. Overriding text-decoration is an easy customization.
Actually, I have abandoned my use of icon links in my design. The problem with these links was they were either too small to tap reliably on my iphone or they took up too much space. I'm now trying button dropdowns. For such dropdowns, a btn works good for the toggle (even if the button is just a cog or some other glypicon) so I don't need icon links any more. And, btn with dropdown works well on all screen sizes.
Cool. I don't think we'd add this just yet, but cool to hear about. Closing for now.