Page 1 of 1

Suddenly ... underlined links?

Posted: Thu Mar 05, 2020 4:41 am
by doctissimus
Hi,

I might have just missed this before now, but after generating my latest PDF output from a basic map file (Oxygen 22), I noticed that all the links are underlined. I'm using out-of-the-box transformations and I haven't created any customized CSS.

Is this the normal behavior? I found a knowledge base article (https://www.oxygenxml.com/doc/versions/ ... l?hl=links) with tips for changing link styles to bold & underlined, but that only makes me think that the default link features no underline style. Am I out to lunch, or did I maybe change a setting inadvertently?

Any insight is appreciated.

Thanks,

doctissimus

Re: Suddenly ... underlined links?

Posted: Thu Mar 05, 2020 3:07 pm
by Costin
Hi,

This is the default link styling and the links were styled the same way in the version 21 as well.
However, if you do not want the links to be underlined, you could use a simple CSS with the rule:

Code: Select all

*[class ~= "topic/xref"],
*[class ~= "topic/link"] {
    text-decoration: none;
}
Then pass the customization .css file, either directly, through the transformation scenario parameter "args.css", or include it in a publishing template.

Regards,
Costin

Re: Suddenly ... underlined links?

Posted: Thu Mar 05, 2020 10:43 pm
by doctissimus
Hi Costin,

Thanks very much for the valuable information, I appreciate your time. I'll add that text decoration to a custom CSS file, as suggested.


doctissimus

Re: Suddenly ... underlined links?

Posted: Fri Mar 06, 2020 10:07 pm
by doctissimus
Hi all,

Thanks to Costin's help, I managed to remove underlining from links to topics and from links to external URLs. I'm still seeing the underline style applied to links from the <term> elements that I added for glossary references (I'm publishing to PDF - HTML5/CSS)

As it stands, this is the relevant section from my customized CSS file:

Code: Select all

*[class ~= "topic/xref"],
*[class ~= "topic/link"],
*[class ~= "topic/term"]{
    text-decoration: none;
}
I'm still quite new to customizing DITA output, so I'm obviously doing something wrong. Is it possible to customize these <term> elements so there is no longer an underline style applied when I keyref them to a related <glossref> in my glossary map?

Thanks,

doctissimus

Re: Suddenly ... underlined links?

Posted: Tue Mar 10, 2020 3:25 pm
by chrispitude
Hi doctissimus,

You can use Oxygen's CSS Inspector feature to determine where a style comes from:

https://www.oxygenxml.com/doc/versions/ ... -view.html

https://www.oxygenxml.com/demo/CSS_Inspector.html

This also helps you learn about selectors, and helps you understand what selector to write to overwrite the default style with your own.

- Chris