ZK 7.X Can't Change Font Awesome Icon Size without bootstrap link

asked 2015-10-14 19:57:57 +0800

ansancle gravatar image ansancle
317 9

I am using ZK 7.03EE (soon 7.06EE) and want to start using Font Awesome. My first issue is without including the link in the zul :

<h:link href="//netdna.bootstrapcdn.com/font-awesome/4.0.1/css/font-awesome.css" rel="stylesheet"/>

I can't change the icon size using the fa-2x, fa-3x, fa-4x, fa-5x tags. No matter what I put in for the sizing component has no effect, it's always fa-2x. I cannot use the link since I can't always count on having an internet connection at the customer site.

<button iconSclass="z-icon-power-off fa-5x"/>

How can I change the size without adding the link?

Also, I see that this is only available for LabelImageElement types, is there anyway it can be used with an Image?

delete flag offensive retag edit


You need the CSS file. It doesn't matter if its included in your project or external link :)

chillworld ( 2015-10-14 21:18:24 +0800 )edit

Thanks for the info! What about using it on a component other than LabelImageElement? Specifically just image?

ansancle ( 2015-10-15 02:00:05 +0800 )edit

That's more difficult. I can't really know what you need, but if it was me I should try out some subclasses of LabelImageElement and see if I can style them to what I need.

chillworld ( 2015-10-15 13:25:04 +0800 )edit

I need to be able to have it on Image, I just started looking at their code to see how I could do this and I can't via normal subclassing since they set the iconSclass via AuxInfo and that's private in the parent class of XulElement. I will ask them directly via support and post any response.

ansancle ( 2015-10-15 14:33:10 +0800 )edit
Be the first one to answer this question!
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

1 follower



Asked: 2015-10-14 19:57:57 +0800

Seen: 44 times

Last updated: Oct 14 '15

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More