[Koha-devel] koha 1,4, templating and css

Roger Buck rog at saas.nsw.edu.au
Wed Oct 9 17:30:04 CEST 2002


Warning: This is long and for some extended CSS2 info only :)

Andrew Arensburger wrote:
> 
> On Wed, Oct 09, 2002 at 09:59:48PM +1000, Roger Buck wrote:
> > I now vote for:
> >
> > <serverroot>/<theme>/<lang>/
> >                           ./style/
> >                                 ./*.css
> >
> >                          ./catalogue/
> >                                    ./*.html
[--snip--]
> > ... and so on at discretion of theme author....
> >
> > I think that Dorian suggested that some time ago.
> >
> > Does that make sense?
> 
> Mostly, except for the location of *.css files.

I felt the same way initially... but I spent a lot of time testing
various options on a working test system. After three days of testing it
proved to be a clear "stand out" best option YMMV :)

> (I confess
> that I'm almost entirely ignorant about CSS, so I'll ask you to put up
> with naive questions, and to enlighten me when I'm wrong.)

In addition to searching  the web for .css info:

Something to read...
 Cascading Style Sheets: Designing for the Web ,
 Second Edition 
 Hakon Wium Lie, Bert Bos
 0201596253
 JUL 06, 1999

Something to play with...
  http://www.price-media.demon.co.uk/cascade.html

> As I understand it, stylesheets specify colors, fonts, and all
> of those little presentation details.

"CSS2 is a style sheet language that allows authors and users to attach
style (e.g., fonts, spacing, and aural cues) to structured documents
(e.g., HTML documents and XML applications). By separating the
presentation style of documents from the content of documents, CSS2
simplifies Web authoring and site maintenance. 

CSS2 supports media-specific style sheets so that authors may tailor the
presentation of their documents to visual browsers, aural devices,
printers, braille devices, handheld devices, etc. This specification
also supports content positioning, downloadable fonts, table layout,
features for internationalization, automatic counters and numbering, and
some properties related to user interface."

Source: http://www.w3.org/TR/REC-CSS2/


This may go a little beyond what you were thinking about in terms of
fonts and colours - it includes whole page layout and delivery method?


> In particular, AIUI, stylesheets
> do not specify content.
>         So why would the *.css files go in <theme>/<lang>? How are the
> French link colors different from the Italian or German colors?
>         Okay, so the Japanese and Cherokee versions of the web page
> will obviously use different fonts. But most everything else will be
> identical across languages, right? Perhaps there should be theme-wide
> CSS and a separate per-language CSS?

I'm probably not telling you anything new but: The idea is that .css can
be used to easily and efficiently deliver the _same__content_ in a large
variety of ways. I think you actually have to work with it for a while
until you see how powerful it is.


> I'm mainly concerned with duplication

[--snip--]

A single style sheet could still be used if that were prefered... even
if it were necessary to symlink or copy. I just don't think that should
be the default.

On the other hand, the flexibility of using one or more .css for each
<theme><lang> offers designers substantial savings in terms of
development/update/modification time... (IMHO)... For example, compared
with editing one or more .html or .tmpl. files, the use of .cs makes it
trivial for a designer to turn off/on site-wide underlining (see prev.
message here from Ambrose Li).

As per previous message from Rachel, there _are_  problems with browser
compatibility - especially Netscape 4.0. On the other hand, I have
participated in a .css project of some scale (education assessment
exercise) where it was a requirement that all page layout and style was
performed by use of .css only (no tables etc)...  and where the
requirement was complete compatibility with an early version of NS4.

So long as you don't go "css crazy", I believe (from experience) that
using css is surprisingly effective... and browser compatibility is
_always_ an issue - no matter what design approach you choose.

.CSS is a bit like wine... starts out tasting like poison but most
people who persevere soon develop a taste for it <grin>

R.




More information about the Koha-devel mailing list