Suddenly ... underlined links?

doctissimus
Posts: 8
Joined: Tue Mar 03, 2020 11:15 pm

Suddenly ... underlined links?

Post by doctissimus » Thu Mar 05, 2020 4:41 am

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

Costin
Posts: 711
Joined: Mon Dec 05, 2011 6:04 pm

Re: Suddenly ... underlined links?

Post by Costin » Thu Mar 05, 2020 3:07 pm

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
Costin Sandoi
oXygen XML Editor and Author Support

doctissimus
Posts: 8
Joined: Tue Mar 03, 2020 11:15 pm

Re: Suddenly ... underlined links?

Post by doctissimus » Thu Mar 05, 2020 10:43 pm

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

doctissimus
Posts: 8
Joined: Tue Mar 03, 2020 11:15 pm

Re: Suddenly ... underlined links?

Post by doctissimus » Fri Mar 06, 2020 10:07 pm

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

chrispitude
Posts: 249
Joined: Thu May 02, 2019 2:32 pm

Re: Suddenly ... underlined links?

Post by chrispitude » Tue Mar 10, 2020 3:25 pm

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

Post Reply