Page 1 of 1

Hide XML Comments with CSS or LESS in Author Mode

Posted: Tue Jun 14, 2016 5:59 pm
by friedemann_bach
Dear Forum!

Is there a way to hide XML Comments in the Author Mode using CSS or LESS (a) in general and (b) in specific elements?

Re: Hide XML Comments with CSS or LESS in Author Mode

Posted: Wed Jun 15, 2016 9:13 am
by Radu
Hi,

You first need to define a namespace declaration in the CSS like:

Code: Select all

@namespace oxy "http://www.oxygenxml.com/extensions/author";
and then match the XML comment something like:

Code: Select all

oxy|comment {
display:none !important;
}
That !important flag needs to be set because the builtin styling CSS added by Oxygen by default specifies most of its selectors using the !important flag so you need to overwrite that:

https://www.oxygenxml.com/doc/versions/ ... ctors.html

Regards,
Radu

Re: Hide XML Comments with CSS or LESS in Author Mode

Posted: Wed Jun 15, 2016 12:45 pm
by friedemann_bach
Great, Radu, thank you very much!

Re: Hide XML Comments with CSS or LESS in Author Mode

Posted: Mon May 06, 2019 11:46 pm
by sfogel2
Hi, Radu...I'd like to request a menu choice or icon to hide/show XML comments in author mode. Thx

Re: Hide XML Comments with CSS or LESS in Author Mode

Posted: Tue May 07, 2019 10:32 am
by sorin_carbunaru
Hi Steve,

You can create an alternate CSS (see https://www.oxygenxml.com/doc/versions/ ... t-CSS.html), which will be displayed in the Styles menu from the toolbar.

All the best wishes,
Sorin Carbunaru
oXygen XML