Page 1 of 1

additional CSS features for Author mode

Posted: Thu Oct 15, 2015 4:01 pm
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.

Re: additional CSS features for Author mode

Posted: Fri Oct 16, 2015 9:31 am
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

Re: additional CSS features for Author mode

Posted: Fri Oct 16, 2015 5:08 pm
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.

Re: additional CSS features for Author mode

Posted: Mon Oct 19, 2015 9:47 am
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

Re: additional CSS features for Author mode

Posted: Mon Oct 19, 2015 12:26 pm
by friedemann_bach
Great, thank you!

Re: additional CSS features for Author mode

Posted: Wed May 04, 2016 3:27 pm
by Radu
Hi,

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

Regards,
Radu

Re: additional CSS features for Author mode

Posted: Tue May 08, 2018 4:45 pm
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

Re: additional CSS features for Author mode

Posted: Wed May 09, 2018 7:35 am
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

Re: additional CSS features for Author mode

Posted: Wed Feb 12, 2020 8:52 pm
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

Re: additional CSS features for Author mode

Posted: Thu Feb 13, 2020 1:04 pm
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