Changing the Color of <comment> in Author Mode

fabdf
Posts: 10
Joined: Fri Apr 26, 2013 3:58 pm

Changing the Color of <comment> in Author Mode

Post by fabdf » Wed Aug 21, 2019 12:22 am

Hi,

Can you tell me how to change the color of the <comment> tag in Author mode in 21.1? I know how to change it for Text mode, but even after following the instructions in your help about how to modify additional CSS selectors, I was unable to change it in Author mode. This is the help topic I referenced: https://www.oxygenxml.com/doc/versions/ ... 2Ccomments

Thanks,
Fabio

Radu
Posts: 6450
Joined: Fri Jul 09, 2004 5:18 pm

Re: Changing the Color of <comment> in Author Mode

Post by Radu » Wed Aug 21, 2019 8:40 am

Hi Fabio,

The "oxy|comment" CSS selector is special for matching XML comments like "<!-- some comment -->".
What exactly do you mean by "<comment> tag"? If it's an actual XML element called "comment" then you just match it using the regular selector like:

Code: Select all

comment {color:blue;}
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

fabdf
Posts: 10
Joined: Fri Apr 26, 2013 3:58 pm

Re: Changing the Color of <comment> in Author Mode

Post by fabdf » Thu Aug 22, 2019 11:35 pm

Hi Radu,

Thanks for getting back to me. I mean the DITA XML <comment> tag and how it appears in Author mode in oXygen 21.1. In version 18.0, it used to appear in green. How can we change the color to green in 21.1? It's not a big deal, but some of the authors on our team that use Author mode often are finding it difficult to distinguish the comments from the other text in a topic.

Thanks,
Fabio

Radu
Posts: 6450
Joined: Fri Jul 09, 2004 5:18 pm

Re: Changing the Color of <comment> in Author Mode

Post by Radu » Fri Aug 23, 2019 8:48 am

Hi Fabio,

There is no DITA <comment> tag. There is a DITA <draft-comment> tag and there are XML comments (<!--comment text-->). You are probably referring to XML comments because indeed in one version we changed their color from green to gray.
You need to create a custom CSS stylesheet containing:

Code: Select all

@namespace oxy "http://www.oxygenxml.com/extensions/author";

oxy|comment {
     color: green !important;
}
and then extend the DITA framework configuration to use your custom CSS:

https://blog.oxygenxml.com/2016/10/cust ... iting.html

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

fabdf
Posts: 10
Joined: Fri Apr 26, 2013 3:58 pm

Re: Changing the Color of <comment> in Author Mode

Post by fabdf » Fri Aug 23, 2019 5:44 pm

Thanks Radu. We'll try this and let you know if we have any questions.

Fabio

Post Reply