OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Subject: RE: DOCBOOK-APPS: Is it time to rely on CSS?



Agreed.

It is neither wise to rely entirely in a past HTML version as it is to rely
entirely on CSS without proper browser support. Note that the XSL
stylesheets already use HTML 3.2 and some CSS1. The HTML-only party should
remenber that the old browsers will not support HTML 3.2 correctly, the
same way they will not display CSS1 rules. In particular Netscape 4 is
buggy on both HTML and CSS levels.

The main problem is that people sometimes forget that HTML is _not_
WYSIWYG, and to expect visual conformance in all browsers is futile. I
think a viable strategy for the DocBook stylesheets is to avoid generating
styling code, and concentrate in the HTML semantic markup. This way, is is
easier to do the formatting in the CSS layer. For example, if the DocBook
<acronym> tag generated a corresponding HTML <acronym> tag, I could style
it easily with a simple CSS rule, instead of having to write a
customization layer to override the XSL template in inline.xsl (which
simply produces common text). Most of my HTML customization layer consists
of code to insert class attributes or some <span> and <div> elements.

Such prioritization of semantic markup may seem strange in a XSL
stylesheet, which is supposed to infund style in the code, but it would
have several benefits:
      - it would make the templates simpler;
      - it would require fewer customizations;
      - it would mare easier to keep HTML and XHTML stylesheets paired;
      - it would allow us to style more efficiently, because it is easier
to maintain several CSS stylesheets than several XSL customization layers;
      - it would make the generated HTML more accessible (as in respect to
the W3C accessibility guidelines).

We don't  need to embed CSS2 in the XSL stylesheets at all. They only need
to provide the hooks (<div>s, <span>s, and class attributes) to allow CSS
to do its job. This means simplifying the generated code, not complicating
it. The expected default behavirour could be provided by the default HTML
behaviour (i.e., by the browser) or by a static default CSS stylesheet with
very simple rules. The people who must support old browsers can just use
this, and the more stylish folk can play with CSS selectors to achieve the
desired magic.

In resume, I am in favor of using the least CSS needed, but provide enough
class attributes (and spans and divs) to allow for CSS with the minimum of
template overriding. Is that viable, Norm?



=============================================
Marcelo Jaccoud Amaral
Petrobrás (http://www.petrobras.com.br)
mailto:jaccoud@petrobras.com.br
voice: +55 21 2534-3485
fax: +55 21 2534-1809
=============================================
There are only 10 kinds of people in the world: those who understand binary
and those who don't.



                                                                                                               
                      Jeff Beal                                                                                
                      <jeff.beal@ansys.        Para:     'Adam DiCarlo' <adam@onshored.com>, Bob Stayton       
                      com>                      <bobs@caldera.com>                                             
                                               cc:       Norman Walsh <ndw@nwalsh.com>,                        
                      21/01/2003 15:03          docbook-apps@lists.oasis-open.org                              
                                               Assunto:  RE: DOCBOOK-APPS: Is it time to rely on CSS?          
                                                                                                               




Actually, external stylesheets have a lower precedence than any internal
style rules.  The only way authors can override internal style rules is
with
an !important rule in the external CSS, and I think that is a particularly
poorly supported feature of CSS2.  This, in my opinion, is another point in
favor of leaving CSS out of the HTML as much as possible.

Jeff

-----Original Message-----
From: Adam DiCarlo [mailto:adam@onshored.com]
Sent: Tuesday, January 21, 2003 11:46 AM
To: Bob Stayton
Cc: Norman Walsh; docbook-apps@lists.oasis-open.org
Subject: Re: DOCBOOK-APPS: Is it time to rely on CSS?


Bob Stayton <bobs@caldera.com> writes:

> On Mon, Jan 20, 2003 at 01:21:43PM -0500, Norman Walsh wrote:
> > Is it time to move that line farther out, removing things that could
> > be done with CSS and just expecting CSS to be used?
>
> I think this is ok.

I would also agree.  I would say CSS1 and much of CSS2 is ok to use.
Probably CSS1 has everything you want to do in it?

> I'm concerned about the transition.  If we are expecting CSS to be
> used, would we supply a basic CSS stylesheet that implements these
> changes and gives people the framework for customizing?  Otherwise
> we will probably get complaints about things that formerly worked
> being broken.

I would suggest the generated CSS should have inline document-level
CSS providing the default.  This goes in the HTML heading.  Authors
can override this with an external CSS stylesheet.

Benefits:

- the external stylesheet can override just those bits of
  style the document author wants to override, and not have to carry
  around all the default styling

- more standalone: for poeple who are fine with the default style,
  there's one less file to worry about (the external stylesheet)

Downsides:

- bigger HTML files?  redundant CSS default in each HTML file in the
  chunked context...

> Also, I think we had better stick to CSS1.  I've found CSS2
> conformance to be very inconsistent among browsers.
> Unfortunately, that's where the table stuff is.

I agree.  Lets stick to CSS1 for now and move to CSS2 later as needed.
Walk before you run.

--
...Adam Di Carlo..<adam@onshore-devel.com>...<URL:http://www.onshored.com/>







[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Powered by eList eXpress LLC