additional CSS features for Author mode

Are you missing a feature? Request its implementation here.
friedemann_bach
Posts: 48
Joined: Wed Oct 22, 2014 4:11 pm

additional CSS features for Author mode

Post by friedemann_bach »

Dear Forum,

is there a chance that the Author mode will support one or more of the following CSS features in one of the next releases?
  • property/value "font-variant: small-caps"
  • property "text-decoration-color"
  • selector "::first-letter"
This would be of relevance when configuring the Author mode, mainly for working with historical texts. The most important one would be Small-Caps, which would be useful to make the text more similar to the historical appearance. Text-Decoration-Color would be great to represent semantical markup with colors. ::First-Letter would be "nice to have" for representing larger initial letters in a paragraph.
Radu
Posts: 9018
Joined: Fri Jul 09, 2004 5:18 pm

Re: additional CSS features for Author mode

Post by Radu »

Hi,

Please see some possible answers below:
property/value "font-variant: small-caps"
We do not yet have support for this, we tried to do this once but we do not seem to have much support in the Java VM for it.
But there are free TTF fonts which render with small-caps by default (you can google for "TTF small caps font").
And Oxygen can dynamically load a font using the CSS font-face property:

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

so instead of using small-caps font variant you could change the font-family on that element to use a particular font which renders everything with small caps.
property "text-decoration-color"
Oxygen should support this already. Could you give me a small example of what your CSS selector looks like?
selector "::first-letter"
I will add an improvement request for this. Could you tell me about your use-case?

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
friedemann_bach
Posts: 48
Joined: Wed Oct 22, 2014 4:11 pm

Re: additional CSS features for Author mode

Post by friedemann_bach »

property/value "font-variant: small-caps"
We do not yet have support for this, we tried to do this once but we do not seem to have much support in the Java VM for it.
But there are free TTF fonts which render with small-caps by default (you can google for "TTF small caps font").
Good workaround, this works fine in our case. Thanks!

property "text-decoration-color"
Oxygen should support this already. Could you give me a small example of what your CSS selector looks like?
Sure:
in XML(TEI): <hi rend="underline">Beobachter</hi>
in CSS: text body hi[rend~='underline'] { text-decoration:underline; text-decoration-color:red; text-decoration-style:double; }

It is rendered double underlined, but not red. I am still using Oxygen 16, so maybe I just have to update?

selector "::first-letter"
I will add an improvement request for this. Could you tell me about your use-case?
Of course. We are working with historical texts and use Oxygen Author for transcriptions. It would be nice to configure the transcription Author mode in a way that looks similar to the original design. In many of our historical texts, sometimes the first letter of a paragraph is enlarged. This is documented in an attribute on the paragraph (@rendition in TEI). Of course, we could also enclose the initial letter in another element, but it would be more convenient for the editors if it was possible to deduce the design by the rendition attribute of the whole paragraph.
Radu
Posts: 9018
Joined: Fri Jul 09, 2004 5:18 pm

Re: additional CSS features for Author mode

Post by Radu »

Hi,
in XML(TEI): <hi rend="underline">Beobachter</hi>
in CSS: text body hi[rend~='underline'] { text-decoration:underline; text-decoration-color:red; text-decoration-style:double; }
It is rendered double underlined, but not red. I am still using Oxygen 16, so maybe I just have to update?
Sorry about that, I managed to reproduce the problem on my side and we'll probably fix it in Oxygen 18.0 (next year in Spring).
A workaround for this could be done using a double bottom border like:

Code: Select all

hi[rend ~= 'underline']{
border-bottom:double red;
text-decoration:none;
}
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
friedemann_bach
Posts: 48
Joined: Wed Oct 22, 2014 4:11 pm

Re: additional CSS features for Author mode

Post by friedemann_bach »

Great, thank you!
Radu
Posts: 9018
Joined: Fri Jul 09, 2004 5:18 pm

Re: additional CSS features for Author mode

Post by Radu »

Hi,

The problem with the "text-decoration-color" CSS property should be fixed in Oxygen 18.0.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
joerg.hambuch
Posts: 19
Joined: Thu Nov 14, 2013 1:04 pm

Re: additional CSS features for Author mode

Post by joerg.hambuch »

Hello,

I just tried small-caps in oXygen XML Editor 20. As far as I can see, the CSS features

Code: Select all

:first-letter
and

Code: Select all

font-variant: small-caps;
still are not supported by oXygen.

This is the relevant part of my CSS:

Code: Select all


[rend="kapitaelchen"] {
text-transform: uppercase;
font-variant: small-caps; /* non-functional in oXygen? */
font-size: 80%;
}

[rend="kapitaelchen"]:first-letter { /* ::first-letter seems to be non-functional, too. */
font-size: 100%;
}
This is the XML code snippet:

Code: Select all


<katalognachweis>
<hi rend="kapitaelchen">fehlt</hi>
</katalognachweis>
Please tell me I am just missing something.

Best regards,
Jörg Hambuch
Radu
Posts: 9018
Joined: Fri Jul 09, 2004 5:18 pm

Re: additional CSS features for Author mode

Post by Radu »

Hi Jörg,

You are correct, our Author visual editing mode does not have support for ":first-letter" and font-variant small-caps.
If at some point we manage to add this support we'll update this forum thread.
The workaround for "small-caps" could be an idea I posted in this same thread, loading in the CSS and using a specific font which only displays as small-caps.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
bwalters
Posts: 13
Joined: Wed Dec 11, 2013 4:45 pm

Re: additional CSS features for Author mode

Post by bwalters »

Hello,
Has there been any recent consideration to respect the CSS font-variant small-caps property in the XML Web Author?

I'd like to add my vote for implementing this feature in an upcoming release.

Thanks much,
Bruce
mihaela
Posts: 490
Joined: Wed May 20, 2009 2:40 pm

Re: additional CSS features for Author mode

Post by mihaela »

Hi,

For the moment the font-variant small-caps property is not supported in Web Author. I have added your vote for this feature. We will analyze it again and we will update this thread if it will be available.

Regards,
Mihaela
Mihaela Calotescu
http://www.oxygenxml.com
Post Reply