Page 1 of 1

Distributing custom framework with certain alternative CSS styles turned on by default?

Posted: Fri Nov 16, 2018 12:08 am
by csun
Hello,

I have a question regarding this page:
https://www.oxygenxml.com/doc/versions/ ... css-styles

The figure "Styles Drop-down Menu in a DITA Document" at the bottom of the page shows that a few alternative CSS styles each has a check mark in front of it, e.g. + Full width, +Hints, etc. That's how the CSS styles in my custom framework looks too.

However, after I distribute this custom framework to others, they don't seem to find the alternative CSS turned on by default, i.e. when they click the +Styles drop-down menu, none of the alternative CSS style shows a check mark in front of it.

Is there something that I can do when sharing the custom framework, to allow others have exactly the same alternative CSS styles "checkmarked", under the +Styles drop-down menu?

Thanks,
Charles

P.S. I did some search and found this thread, which might be somewhat related: topic10621.html However, my use case seems to be a bit different as it is more about how to control the default behavior of the shared framework.

Re: Distributing custom framework with certain alternative CSS styles turned on by default?

Posted: Mon Nov 19, 2018 4:32 pm
by Radu
Hi Charles,

Sorry but I do not have a good workaround to propose you. I added an internal issue to take your suggestion into account.

Regards,
Radu

Re: Distributing custom framework with certain alternative CSS styles turned on by default?

Posted: Mon Nov 19, 2018 8:03 pm
by csun
Thanks Radu for your reply, and for adding an internal issue about this.

Re: Distributing custom framework with certain alternative CSS styles turned on by default?

Posted: Tue Nov 20, 2018 8:28 am
by Radu
Hi Charles,

I think I got an idea about how to make this work. Let's say your original layer CSS is called "Hide draft comments" but you want them to be hidden from the start. You create an extension of the DITA framework:

http://blog.oxygenxml.com/2016/10/custo ... iting.html

which allows you to contribute a CSS to the default rendering so that draft comments are hidden by default.
You modify the "Hide draft comments" CSS layer to be called "Show draft comments" and point it to your own CSS which shows draft comments.

Regards,
Radu

Re: Distributing custom framework with certain alternative CSS styles turned on by default?

Posted: Tue Nov 20, 2018 10:54 pm
by csun
This sounds to be a good workaround; I can give it a try. Thanks!