Apply a particular alternate (incremental) CSS file by default

Are you missing a feature? Request its implementation here.
chrispitude
Posts: 529
Joined: Thu May 02, 2019 2:32 pm

Apply a particular alternate (incremental) CSS file by default

Post by chrispitude »

We have custom CSS styles that are configured as alternate (incremental) CSS styles:

image.png
image.png (89.49 KiB) Viewed 172 times

We want these CSS styles to always be used because they configure our environment in particular ways that are important and useful to us. However, currently the behavior is that alternate CSS styles have a "disabled" default state until enabled. Once changed, the setting is indeed remembered. However, I continue to get support cases by people confused by the editor behavior, in which the resolution is to enable the alternate style. This has been happening for a couple of years now, and so it's time to file the enhancement request. :)

I think this occurs when
  • A new writer comes into the team
  • A writer clones a new Git repository to work with
  • A writer uses a loaner laptop
  • A writer reinstalls Oxygen (I think - I have to test this)
Could Oxygen please provide some way to either mark alternate CSS files as on-by-default, or as always-applied?

A testcase is included:
oxygen_default_alternate_css.zip
(41.76 KiB) Downloaded 8 times

(Additionally, there seems to be a small bug in that for DITA-OT project files, alternate CSS files are not treated as incremental.)

Thanks!
Radu
Posts: 8092
Joined: Fri Jul 09, 2004 5:18 pm

Re: Apply a particular alternate (incremental) CSS file by default

Post by Radu »

Hi Chris,
This was already requested here, maybe you can look also at the possible workaround I gave there:
post50280.html#p50280
The internal issue on our side is:
EXM-42515 Specify default checked state for alternate CSS

About this other remark:
(Additionally, there seems to be a small bug in that for DITA-OT project files, alternate CSS files are not treated as incremental.)
If you edit the DITA OT Project framework configuration extension you have created in the Oxygen Preferences->"Document Type Associations" page and look in the "Author" tab, under the list of CSSs there should be a checkbox named "Enable multi selection of alternate CSSs":
https://www.oxygenxml.com/doc/versions/ ... tyles.html
The Enable multiple selection of alternate CSSs checkbox at the bottom of the pane must be selected for the alternate CSS styles to be combined. They are applied like layers and you can activate any number of them. If this option is not selected, the alternate styles are treated like main CSS styles and you can only select one at a time
Our user's guide also seems to state that:
By default, this option is selected.
which does not seem to be the case when creating a new framework configuration, I will add an extra internal issue to look into this.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
chrispitude
Posts: 529
Joined: Thu May 02, 2019 2:32 pm

Re: Apply a particular alternate (incremental) CSS file by default

Post by chrispitude »

Hi Radu,

Thanks for pointing out the "Enable multi selection of alternate CSSs" checkbox! it looks like the base DITA-OT project framework does not have this checkbox checked, and so the extended framework inherited that setting.

Regarding the workaround you linked, I posted this question because of this post in which I decided to convert my full CSS file back into an incremental CSS file.

But in rereading my own discussion in that thread, I re-realized my solution is simply to create a full CSS file that applies Oxygen's default CSS, then my overlay:

Code: Select all

@import "${frameworks}/dita/css/core/-dita.css";
@import "my-company-overlay.css";
and now I have a full CSS file that always applies my overlay on top of the default CSS. Thank you!!

Sometimes I get so far down a path of thinking, I forget where I started from...
Post Reply