Closed (fixed)
Project:
Link favicon formatter
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
12 Nov 2012 at 11:07 UTC
Updated:
22 Apr 2015 at 07:12 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
2phaIt's about time I got around to answering this now the module is a full project.
I don't like the idea of adding classes via the interface. I think that classes and custom markup belongs in the theme layer.
If it is really needed, the theme_link_favicon_formatter_favicon($vars) can be overridden.
If there were many requests for this though, I would probably reconsider.
Comment #2
Homotechsual commentedI think a class should at least be added by default if you're not going to provide an option to set one (which I understand entirely).
A default class will make this targetable by themers at least.
Comment #3
Homotechsual commentedOn the subject of thumbing as a brief note:
To get the image to align correctly with the text set vertical-align to text-bottom.
Comment #4
2phaThe field that the favicon is attached to already has a class name. to target the favicon image you just need to add "img" to the selector. eg "field-name-my-field img". I see no need to add more markup/classes.
If you really want your own class, just override the theme function.
Comment #5
Homotechsual commentedCare to post a how-to for the theme function override so that people don't end up continually asking the question on the issue queues, if not I'll dig into the code and post a how to.?
I appreciate not wanting to add code bloat but I suspect this will be very useful for scenarios where fields contain multiple images (including the favicon) which need to be styled differently/separately.
Admittedly those are likely to be marginal use cases. I'm just looking at displaying preview screenshots for a link and having the favicon overlayed on top.
Comment #6
2phayeh...good idea...I'll add it to the project page when I get a chance.
Comment #7
Prancz_Adam commentedNice fature! I like it. A css class would be great to padding the favicon. Thanks!
Comment #8
lolandese commentedAttached patch adds the class link-favicon to the image. This way it can be targeted with custom CSS, for example:
Comment #10
2phaComment #11
2pha