Remove <a> underline in Print medium?

This forum is for all Flare issues related to styles, stylesheets and XML.
Post Reply
MunchMan
Propeller Head
Posts: 28
Joined: Mon Oct 19, 2015 9:35 am
Location: near Dallas, TX

Remove <a> underline in Print medium?

Post by MunchMan »

This question has certainly been asked before, but I couldn't find an answer to my problem. I understand mediums and love them. I thought this would be an easy one, but after investing several hours on trial an error, I just can't figure it out. If I set "text-decoration" for the Default medium to "none" of <a> to get rid of the underline in <a href> links, it disappears from online content but not from a PDF (the target is set to "print" medium). If I set an additional text-decoration "none" for Print medium, it still doesn't remove the underline. A color change (maroon) won't take in print either. If I add a font-size change, that takes, but the underline and original color (blue) remain. All these style changes show clearly in the friendly CSS window; in the text CSS, the "font-size" label (which works) is blue, but "text-decoration" and "color" labels (which don't work) are red; the values for all three are blue. There is no local formatting, just "Get more info at <a href="[%=Variables.DigiTrak-http%]"><MadCap:variable name="Variables.DigiTrak-www" /></a>. This behavior persists whether I use variables or plain text in the link path or text. I can make the underline disappear with local formatting "text-decoration: none;", but obviously I risk a public scourging by even suggesting that :) . I could create a separate style just for the xfef'd text, but that's so extra-workaround-stupid I haven't even tried it yet :). I also cannot use cross-references here because I am pointing to a website, not a location in the project. I checked in another project and got the same persistent underline. How/where do I get rid of it in the CSS? Many thanks!
css error.PNG
You do not have the required permissions to view the files attached to this post.
SteveS
Senior Propellus Maximus
Posts: 2089
Joined: Tue Mar 07, 2006 5:06 pm
Location: Adelaide, far side of the world ( 34°56'0.78\"S 138°46'44.28\"E).
Contact:

Re: Remove <a> underline in Print medium?

Post by SteveS »

Is there something further down in the stylesheet that's overriding it? Looking at your screenshot you've got at least 800 lines so something could be missed.

I'd try a search for text-decoration (if you haven't already) to see if there are any potential cascade effects.
Image
Steve
Life's too short for bad coffee, bad chocolate, and bad red wine.
AlexFox
Sr. Propeller Head
Posts: 161
Joined: Thu Oct 19, 2017 1:56 am

Re: Remove <a> underline in Print medium?

Post by AlexFox »

If you change to Print Layout and Print medium in the XML editor and use the style inspector, this would probably tell you where it's inheriting its style from.
MeganTR
Jr. Propeller Head
Posts: 4
Joined: Tue Feb 20, 2018 4:58 pm

Re: Remove <a> underline in Print medium?

Post by MeganTR »

Check if you have any additional link classes in your stylesheet, such as a.active, that are inferring.
MunchMan
Propeller Head
Posts: 28
Joined: Mon Oct 19, 2015 9:35 am
Location: near Dallas, TX

Re: Remove <a> underline in Print medium?

Post by MunchMan »

Thanks all for your suggestions. None were “it”, but they did get me to the answer!

SteveS: The only occurrence of “text-decoration” (TD) is in the Print Medium section, which has only the definition for <a>. I moved it to the main Default section, deleted the Print section, set the Target to use Default instead of Print, and still get an underline.

AlexFox: The Style Inspector clearly says “text-decoration: none” in the [first] Local Style Attributes section; no TD is inherited from <p> or <body>. Though if I take the TD-none completely out, the inspector still says “TD-none” but there is still an underline both in the XML window and the final PDF :-).

MeganTR: None of the pseudo classes have any additional styles set. I even tried setting pseudo Active to TD-none (again) and still get an underline.

I opened another project with a much smaller style sheet and the <a> underline will not go away there either. I created a brand new project and underline is defaulted to Inherit. I set the <a> style for TD to none, save, and…nothing happens in the XML.

But I saw another style in the text SS called “a:link” that had a color and weight assigned, so I added TD-none...and it worked. Went back to my actual project and was happy to see it work there too. Perhaps <a> alone just doesn’t reflect that attribute, even though you can set it. True or not, check this one off as resolved. Thanks again!
Post Reply