[sword-devel] Color in osis

Karl Kleinpaste karl at kleinpaste.org
Sun Mar 17 07:07:29 MST 2019


On 3/17/19 6:23 AM, refdoc at gmx.net wrote:
> Xiphos then adds a few further standard (for Xiphos) CSS styles to the
> mix.
Not exactly.

Xiphos uses exactly one nonstandard CSS control, .introMaterial,
specifically because OSIS tools and Sword processing do not generate a
distinct display class for introductory material. I initially encoded a
simple "<i>...</i>" wrap but then decided to generalize it to
".introMaterial { font-style: italic; }", because I'd have to change
Xiphos for any future Sword change anyhow.

However, for this purpose, the deeper problem is that Sword erroneously
generates self-closing <div> tags, which do not work. Search "html
self-closing div" and discover all the conflicting noise over it. My
solution in Xiphos was simply to obliterate these tags in introductory
material; they have no visual manifestation and I don't know why the
XHTML filters pass them in the 1st place. They look like

<div sID="gen34165" type="introduction"/>

and they caused my .introMaterial change to bleed throughout the chapter
until I implemented the obliteration. See
https://github.com/crosswire/xiphos/issues/845

No other class tag is specific to Xiphos. It will process class any tag
the module creator or user puts to use.

As far as the mention of front-ends' display being different, if there
is any standard display toolkit against which to compare, WebKit is that
standard, and Xiphos has used it for years now. It's WebKit that's
unhappy with self-closing <div> above, and Xiphos' display has always
consisted almost entirely of "ask engine for content, paste content into
widget for WebKit interpretation," with a few grotesque HTML
post-delivery hacks to get around stuff like bad self-closing <div>.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.crosswire.org/pipermail/sword-devel/attachments/20190317/11100939/attachment.html>


More information about the sword-devel mailing list