Adding inline icons without disrupting defaults

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Adding inline icons without disrupting defaults

devunwired
Hello -

I'm trying to add support for using inline icons (via the icon:xxx[] macro). However, when I enable the :icons: attribute for the document, it also forces all admonition and callout icons to load from the icons directory as well.

Is there a way to add our own set of icons for use in the content without disrupting the base rendering of the standard items?
Reply | Threaded
Open this post in threaded view
|

Re: Adding inline icons without disrupting defaults

mojavelinux
Administrator
Dave,

You can toggle the icons attribute in the flow of the document (assuming the attribute hasn't been locked by an assignment in the API).

= Document Title
:icons!:

NOTE: No icon will be used here.

:icons:
See my cool icon:flag[] icon.

:icons!:

NOTE: No icon will be used here either.

Another solution is to make your own inline macro which operates independently of the icons attribute.

Yet another solution is to use font-based icons, then modify the CSS to control how the icons are displayed (since font-based icons are really CSS-based icons since it's up to the CSS to decide how to handle them).

-Dan

On Mon, Feb 29, 2016 at 2:24 PM, devunwired [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Hello -

I'm trying to add support for using inline icons (via the icon:xxx[] macro). However, when I enable the :icons: attribute for the document, it also forces all admonition and callout icons to load from the icons directory as well.

Is there a way to add our own set of icons for use in the content without disrupting the base rendering of the standard items?


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Adding-inline-icons-without-disrupting-defaults-tp4442.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



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

Re: Adding inline icons without disrupting defaults

devunwired
mojavelinux wrote
You can toggle the icons attribute in the flow of the document (assuming
the attribute hasn't been locked by an assignment in the API).

= Document Title
:icons!:

NOTE: No icon will be used here.

:icons:
See my cool icon:flag[] icon.

:icons!:

NOTE: No icon will be used here either.
This may be the easiest option, I'll give this a try.

mojavelinux wrote
Yet another solution is to use font-based icons, then modify the CSS to
control how the icons are displayed (since font-based icons are really
CSS-based icons since it's up to the CSS to decide how to handle them).
Okay, that's a good tip. I may look into this long-term, as it may be an easier way to for us to maintain one icon set across multiple documents.

Thanks!