Login  Register

Large Icons

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options Options
Embed post
Permalink
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Large Icons

patrickm
Hello,
I see in the inline icons chapter (http://asciidoctor.org/docs/user-manual/#inline-icons)
that for size: "First positional attribute; scales the icon; values: large, 2x, 4x"

I guess that "large" ==how fa-lg (33% increase)... But it doesn't work...
How can I get an intermediate size between 1x and 2x...

Thanks

Patrick


Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: Large Icons

abelsromero
Hi,

I fear the documentation is not updated. You can use "lg" to define the 33% increase*.
Keep in mind that Asciidoctor does some magic but in the end it relies on FontAwesome styles, so pretty much every example here (http://fortawesome.github.io/Font-Awesome/examples/) works if you use the right word.
In the end, asciidoctor takes the arguments of the macro and builds the style prepending "fa-", so you can use 2x,3x,4x,5x,lg.

In fact, you can "hack" several other options liker border or spin, but that's not a good practice and I am not sure how we should deal with them.
I opened and issue to discuss this: this https://github.com/asciidoctor/asciidoctor/issues/1475.


* Btw, I've seen that "lg" adds some extra CSS (line-height: .75em; vertical-align: -15%;), beware.
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: Large Icons

patrickm
Hi,

Great, it works... ! I think I tried "1g" instead of "lg"...

I already tried the spin but didn't notice the border and others....

cheers

Patrick
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: Large Icons

patrickm
I tried the border... It seem to work but only partially...
eg:
This works:
icon:heart[border]  

This doesn't (no border)
icon:heart[2x,border]
icon:heart[border,size=2x]

Anyway, I can live without this :)
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: Large Icons

abelsromero
Just a little disclaimer.
Keep in mind that only size, rotate and flip are officially supported. Other features like border or spin, even when they can be "achieved", it's done with a side effect of the implementation. That's why I filed the issue on GitHub, to discuss what should be the correct behauviour.
Also, don't forget this applies to HTML conversion.

patrickm wrote
This works:
icon:heart[border]  
According to documentation (http://asciidoctor.org/docs/user-manual/#size-rotate-and-flip), the first attribute is by default the size. Again, due to how it is implemented, you can apply some styles, but this is not made on purpouse, or at least seeing the code it does not seem to me like that.

Until Dan says something about this, I would try to avoid them and stick to the official supported features.
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: Large Icons

mojavelinux
Administrator

On Sat, Aug 29, 2015 at 2:57 PM, abelsromero [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Again, due to how it is implemented, you can apply some styles, but this is not made on purpouse, or at least seeing the code it does not seem to me like that.

Until Dan says something about this, I would try to avoid them and stick to the official supported features.

I think the focus of that issue should be on allowing these features to be used. Many didn't exist at the time the macro was introduced, so we didn't properly account for them. But now we could make the necessary adjustments.

-Dan


--
Dan Allen | @mojavelinux | http://google.com/profiles/dan.j.allen
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: Large Icons

mojavelinux
Administrator
In reply to this post by patrickm

On Sat, Aug 29, 2015 at 1:18 PM, patrickm [via Asciidoctor :: Discussion] <[hidden email]> wrote:
icon:heart[border,size=2x]

One way to trick it into working right now is doing:

icon:heart["2x fa-border"]

I think it would be better if the following was supported:

icon:heart[2x,role=fa-border]

However, the role ends up in the wrong place.

-Dan

--
Dan Allen | @mojavelinux | http://google.com/profiles/dan.j.allen
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: Large Icons

mojavelinux
Administrator
In reply to this post by abelsromero

On Sat, Aug 29, 2015 at 10:40 AM, abelsromero [via Asciidoctor :: Discussion] <[hidden email]> wrote:
I fear the documentation is not updated.

I just updated it :)


-Dan


--
Dan Allen | @mojavelinux | http://google.com/profiles/dan.j.allen