Link color in miniTOC

This forum is for all Flare issues not related to any of the other categories.
Post Reply
Mark Johnson
Propeller Head
Posts: 21
Joined: Fri May 25, 2007 9:32 am
Location: Eden Prairie, MN

Link color in miniTOC

Post by Mark Johnson »

I've added a miniTOC proxy to my project, which works great, but I can't figure out how to change the color of the links in the output. They are black and I would like them to be blue. I've gone into the style sheet editor and changed the MadCap|miniTocProxy color with no results (although the underline I specified works fine for some reason). It looks blue in the style sheet editor but not in the output.

Any advice would be greatly appreciated.

Thanks,
Mark
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Link color in miniTOC

Post by LTinker68 »

You need to manually create the pseudo classes under the <a> tag in the stylesheet. I believe the class is a.MCMiniTocLink. So you'd need to manually add the following to the stylesheet file in the following order:

Code: Select all

a.MCMiniTocLink:link {
}

a.MCMiniTocLink:visited {
}

a.MCMiniTocLink:focus {
}

a.MCMiniTocLink:hover {
}

a.MCMiniTocLink:active {
}
Those are all the states -- Flare generally leaves out the focus and active, I think. Once you've added them to the stylesheet file, they'll appear under the <a> tag in the Stylesheet Editor so you can modify them as you normally would.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
KevinDAmery
Propellus Maximus
Posts: 1985
Joined: Tue Jan 23, 2007 8:18 am
Location: Darn, I knew I was around here somewhere...

Re: Link color in miniTOC

Post by KevinDAmery »

Actually, that isn't true: what you need to do is modify the existing p.miniTOC classes. (I just had to do this for my help system last week.) There are multiple levels, which correspond to the level of the topics in the TOC. You can control how many levels get used to create the miniTOC by editing your miniTOC proxy (default is 2 I think).
Until next time....
Image
Kevin Amery
Certified MAD for Flare
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Link color in miniTOC

Post by LTinker68 »

There aren't any pseudo-classes under the p.miniTOC classes, so modifying those tags will only affect the appearance of the non-hyperlinked text. If they're hyperlinked and you want control the appearance of the mouseover states, then you need to create the styles I listed above.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
KevinDAmery
Propellus Maximus
Posts: 1985
Joined: Tue Jan 23, 2007 8:18 am
Location: Darn, I knew I was around here somewhere...

Re: Link color in miniTOC

Post by KevinDAmery »

Again, not true. I had to change the appearance of those styles to get the links to appear correctly in my CHM. Didn't have to make any classes in a.
Until next time....
Image
Kevin Amery
Certified MAD for Flare
NorthEast
Master Propellus Maximus
Posts: 6426
Joined: Mon Mar 05, 2007 8:33 am

Re: Link color in miniTOC

Post by NorthEast »

The a.MCMiniTocLink style is only used in Flare v3.

In the v4 output, you'll see the links are formatted (inside the p tag) using the class a.MiniTOCx (which you'll find defined in MadCap.css).

E.g.

Code: Select all

<p class="MiniTOC1"><a class="MiniTOC1" href="topic.htm">Blah blah</a></p>
The really fun part is working out which of your link properties are inherited from p.MiniTOCx, which come from your a tag, and which are 'default' properties set up in MadCap.css.

For my link formatting, I set up my a style classes (and pseudo classes) in my stylesheet with the '!important' property, so that it overrides all the unwanted 'default' properties that get introduced by MadCap.css.
beagley
Sr. Propeller Head
Posts: 182
Joined: Tue May 06, 2008 1:33 pm
Location: Vermont

Re: Link color in miniTOC

Post by beagley »

Hi,
Is anyone still following this thread?

I'm having trouble with the final issue raised between Kevin and the other poster.

I've changed the appearance of my MiniTOC using the p.MiniTOC styles in the stylesheet.

That works, except that those items are clickable links. Once they are clicked, the a.visited (Pseudo Class) in my stylesheet overrides it. I wouldn't mind so much for color, but the font size change is jarring.

But, if I apply the changes to a.(Pseudo Classes).visited, that will change the appearance of visited links throughout my document.

What I want: to be able to alter the font size and margins on the MiniTOCs that appear on all my folder-level topics in WebHelp. I can change them, but for some reason after they are clicked their font size reverts.

Many I need to create those funky pseudo classes that the original answerer of this post suggests, though Kevin says I shouldn't need to?
rob hollinger
Propellus Maximus
Posts: 661
Joined: Mon Mar 17, 2008 8:40 am

Re: Link color in miniTOC

Post by rob hollinger »

Yes and its not hard to do.
Open your style sheet in Flare and make sure your under Advanced view.
Click on the A style
Click on the "Add Class" on the CSS tool bar.
Type "MiniTOC1" for the Class name.
Open the attributes of the class once its created.
Edit the Link and Visited colors to your choice.

If your miniTOCs are lower level than 1, repeate the steps above but add a 2 etc...

Note: make sure your doing this in the correct Medium so it doesnt effect other outputs such as print.
Rob Hollinger
MadCap Software
beagley
Sr. Propeller Head
Posts: 182
Joined: Tue May 06, 2008 1:33 pm
Location: Vermont

Re: Link color in miniTOC

Post by beagley »

Thank you!

I had a bit of a struggle fixing indentation, and it appears that some of the stuff flips and flops after you have clicked on it,
but after fiddling for a while, I got it to behave.

I now have a much greater understanding (and control) over my miniTOC formatting.
Post Reply