[sword-devel] CSS Again... (was Re: Rendering added words for languages that don't use italics?)
Greg Hellings
greg.hellings at gmail.com
Tue Apr 19 09:38:18 MST 2011
On Tue, Apr 19, 2011 at 11:13 AM, Troy A. Griffitts
<scribe at crosswire.org> wrote:
> Again, to be rude and top-post, not having a specific line in the
> message to which I wish to comment...
>
> I don't believe anyone is against HTML rendering frontends supplying
> stylesheets to their output.
>
> I believe Bibletime does this for their user selectable themes.
This is correct. As part of my changes to BibleTime I migrated themes
out of being HTML templates where all the HTML structure was identical
and the included CSS was different to be a single HTML template with
an included CSS file which differed.
This, however, is nothing remotely like allowing a module to specify
its own rendering stylesheet. Using CSS as a technology and using CSS
as a paradigm are far cries from one another.
>
> I have often lamented the fact that we have at least 3 HTML rendering
> filter sets and have stated that I would love for us all to agree on a
> common, more class-ified HTML output if everyone would concede to share
> the same filter set and help improve the commonly used code.
I think you might get a more robust agreement if the internal
technology were more akin to JSword's. And I'm not talking about its
use of XSL because you have already stated your firm opposition to it.
But if filters brought source material into OSIS and then the
HTML-rendering filters were a single implementation of SAX-style
processing out of OSIS (you have said that SWORD has a SAX-like
interface), you might find this goal easier. BibleTime's extension of
the OSISHTMLHREF class seems to use a process similar to SAX.
>
> I believe frontend developers were in general agreement that
> module-specific style sheets would be a bad idea because they already
> currently allow custom styles for their users and there would most
> certainly be a conflict between what the module writer desires and for
> what the user asks.
An argument which really has no credibility. For 14 years the Web has
been working positively smashingly with the CSS technology. It is
specifically designed to allow this type of conflict to be resolved by
having a well-defined hierarchy of style resolution: user important >
author important > author normal > user normal > user agent. Author
stylesheets are resolved as such: style tag > inline > external. If
you want to read more about it, it is one of the more lucid, brief and
straight-forward w3c statements:
http://www.w3.org/TR/CSS2/cascade.html#cascading-order.
Why this is able to work for tens of millions of websites and web
pages who have no control over their users' user-agents but can't be
used by us, who have extensive control over how the user can see the
data is beyond me.
--Greg
More information about the sword-devel
mailing list