Re: indents

Jon,

Thanks for all the examples. I'm afraid my knowledge of DSSSL is
extremely limited (I read a DSSSL-lite proposal a long time ago)
although your examples seems pretty straight forward. My intention was
NOT to re-invent the wheel. My comments were in the context of extending
CSS, not on using another style system.

Are you suggesting that browser vendors adopt DSSSL (or some
derivative), as well as implement CSS?  Certainly there is nothing that
precludes any vendor from inplementing both style systems, but I thought
that war had been waged and CSS won. You are welcome to disagree :).

For now anyway, CSS has been adopted by MS and NS, so I can envision
that both will want to extend CSS for future needs. It would certainly
seem wise to borrow (steal) from other style systems where it makes
sense. It seems that DSSSL has a much more sophisticated selector
system. My guess is that the inventors of CSS probably looked at the
DSSSL and designed a implementation that was simpler and hence more
doable. Now that the bait has been set and the fish have bitten, perhaps
its time to get mS and NS to go after another prize. After investing in
CSS, it is unclear to me that there is an advantage to supporting
another style system as opposed to just extending CSS. Comments?

Greg

Jon Bosak wrote:

> [Greg Kostello:]
>
> | Defining the stylist behavior for the first paragraph following a
> | headline fulfills a much desired need.
>
> Here's how you would do it in DSSSL:
>
>    (element P
>      (make paragraph
>        first-line-start-indent: (if (first-sibling?)
>                                     0pica
>                                     2pica)))
>
> Notice that this requires no change at all to the document.
>
> | Although, IMHO it doesn't go far enough. Typically, the first and
> last
> | paragraphs in a story may get special treatment, such as different
>
> | indentation on the first paragraph and perhaps a decorative rule
> (not
> | inline) for the last paragraph.
>
> Here you go:
>
>    (element P
>      (make paragraph
>        first-line-start-indent: (if (first-sibling?)
>                                     0pica
>                                     2pica)
>        (sosofo-append
>         (process-children)
>         (if (last-sibling?)
>             (make rule
>                   orientation: 'horizontal
>                   display-alignment: 'start
>                   space-before: 6pt
>                   space-after: 6pt
>                   line-thickness: 1pt
>                   length: 30pica
>                   start-indent: (inherited-start-indent))
>            (empty-sosofo)))))
>
> | A different style sheet may produce an altogether different
> | look. Still, that may not be sufficient. For example, suppose you
> want
> | to describe every other paragraph as having some special stylistic
>
> | treatment (say a background shade of gray).
>
> How about the "Herb Caen" treatment (every other paragraph in bold)?
>
>
>    (element P
>      (make paragraph
>        font-weight: (if (= 0 (modulo (child-number) 2))
>                         ' bold
>                       'medium)
>    [etc.]
>
> Or did Caen always start with the first paragraph in bold and the
> second one in medium?  I can't remember.  Good thing we can change
> the
> treatment around without touching the content, isn't it?
>
>        font-weight: (if (= 1 (modulo (child-number) 2))
>                         ' bold
>                       'medium)
>
> | I think we need a way of specifying style as applying to a pattern
> in
> | a sequence of elements. Opinions?
>
> What a great idea.  :-)
>
> Jon



--
-----------------------------------------------------------------------
Greg Kostello                        mailto://kostello@digitalstyle.com
DigitalStyle Corporation                   http://www.digitalstyle.com/
10875 Rancho Bernardo Road, Suite 110             voice: (619) 618-2222
San Diego, CA 92127                                 fax: (619) 673-5054
-----------------------------------------------------------------------

Received on Monday, 14 April 1997 21:31:07 UTC