Page 1 of 1

Persistent CSS Style Menu option?

Posted: Sat Apr 19, 2014 7:50 pm
by kirkilj
The selected CSS style is maintained for each document opened in Author Mode, which can be handy in some cases, but it means that users have to reselect the desired style for every document that they open. Our users; however, usually want the selected Style to apply to all documents that they are working with at any given time. They choose a given style that suits their task, no matter how many documents they have open.

To give you an idea how this might be exposed in the UI, there might be a checkbox in the Styles Toolbar with the label "Apply to All". There are other options of course.

Given that frameworks, and their corresponding CSS styles, are enabled dynamically for each document, I understand that there are multiple variables in play that would have to be carefully considered.

Regards,

John

Re: Persistent CSS Style Menu option?

Posted: Sat Apr 19, 2014 10:23 pm
by george
Hi John,

I am afraid this is not architecturally correct because the CSS files displayed in that drop down are specific for a document type and the user can have open document that match different document types.

Now, when a document is opened the default CSS is used, as it is specified in the document type configuration. Users can change the default CSS and that will apply to all documents of that type. To change the default CSS go to Options->Preferences -- Document Type Association - select the document type and click on Edit then go to Author -- CSS. There the default CSS is marked with the Alternate value "no" so edit that and make it an alternate stylesheet and then set alternate to "no" on the new CSS that you want to make the default CSS.

Does this help?

Regards,
Goerge

Re: Persistent CSS Style Menu option?

Posted: Wed Apr 30, 2014 1:44 am
by kirkilj
Hi George,

I can understand that the styles are framework-dependent and it makes perfect sense architecturally. But for usability's sake, having to dive into the preferences of our add-on, by making a copy of the framework, going into the CSS list and changing the default is too much to ask for an operation that can be performed many times in succession. The user may want to look at it from Style A's "point-of-view", then Style B, then Style C, make changes, go back to Style B while also bouncing between many documents of the same type.

In an ideal world, I'd like for Oxygen to let the user switch the current style for all other docs that match the current document's framework's rules (e.g. all DITA Topics). Maps have their own styles of course. I imagine a slight change to the Styles menu that would add a toggle menu item at the bottom named something like, "All Files of this Type", or something similar. This would allow the user to allow for your current per-file setting or the one I describe above.

Image

On a related question, will 16.0's profile styling be per-file or will it apply to a larger scope?

John

Re: Persistent CSS Style Menu option?

Posted: Tue May 06, 2014 11:05 am
by george
Hi John,

The styling are configured globally or at project level (as most of the oXygen options).
My colleagues are working to provide you a distribution so you can test this before the 16 release.

Best Regards,
George

Re: Persistent CSS Style Menu option?

Posted: Tue May 06, 2014 12:30 pm
by george
We will discuss more about the possibility to change the CSS for all the files that share the same document type.

However, our API should provide enough support if you want to implement this functionality yourself. For example, imagine that you define the default CSS stylesheet for DITA to be something like "http://www.example.com/auto" and then you can register a URI resolver through our API and resolve that dynamically (based on the selection in a combo box, for example) to different actual CSS stylesheets.

If you want to add additional CSS rules on top of the current selected CSS file then you can just register a URI resolver and provide the CSS content you want for the "http://www.oxygenxml.com/extensions/aut ... Custom.css" URI. Again, the actual CSS can be dynamic, based on the user selection in some drop down.

Best Regards,
George

Re: Persistent CSS Style Menu option?

Posted: Mon May 18, 2015 3:19 pm
by Radu
Hi,

Just to update this thread, in Oxygen 17 after you change the CSS layer to a certain alternate CSS, it will be remembered and used for the next topic you open.

Regards,
Radu

Re: Persistent CSS Style Menu option?

Posted: Wed Jun 26, 2019 2:10 am
by chrispitude
Hi Radu,

Where is this setting stored? Our Oxygen project is stored in a Git repo. I see that the styles are remembered each time I run Oxygen XML Author on my laptop, but another user reported that when he synced our repo and used it for the first time, the styles were not set and he got confused.

Are the default styles set - or settable - in the project file?

Thanks!

Re: Persistent CSS Style Menu option?

Posted: Wed Jun 26, 2019 9:47 am
by Radu
Hi Chris,

The settings are saved in the user's specific options storage, so you cannot share them with somebody else using the project .xpr file.
If you have a CSS layer like "Show draft comments" and you want it checked by default, maybe you could replace it instead with a CSS layer called "Hide draft comments" and have the default CSSs show the draft comments.

Regards,
Radu