Third International World-Wide Web Conference

SIMPLE STYLE SHEETS
FOR SGML & HTML
ON THE WEB

World-Wide Web conference spring 1995
Developer's day --- 14 April 1995
Darmstadt

Bert Bos
Dept. of Humanities Computing
University of Groningen
bert@let.rug.nl

Context: Argo browser

Based on W3A (http://www.let.rug.nl/~bert/W3A)

The HTML applet

  1. real-time ``live'' formatting

    Seems to be the trend: Netscape, HotJava, Arena

  2. implementation:

    FormattedText widget --
    SimpleSGML widget --
    HTML2 widget

    (widgets will become public in a few days)


Widget hierarchy (1)

FormattedText SimpleSGML

Widget hierarchy (2)

HTML2

Assumptions (1)

  1. Addressable units
  2. style sheet is static (declarative)
  3. style sheet consists of rules; rules consist of: selector + property + value; value may be an expression
  4. attributes not in selector, but in expression

Assumptions (2)

  1. text is rendered roughly in the order it is received (exception: tables, math)
  2. only appearrance specified, not interaction
  3. SGML, not just HTML

Stream-based SS vs DSSSL


User preferences

Browser's default style | document's style | user's style

Select 1, 2 or all 3

Combined just like X resources (override, replace, merge)


Style properties (1)

Some selected properties

empty (*IMG.empty: true)

emphasis (*STRONG.emphasis: 2)


Style properties (2)

background (*A.textbackground: yellow)

prebreak, postbreak (*P.postbreak: 0.0)


Style properties (3)

leftindent, rightindent (*BQ.leftindent: 4.0)

track (*FIG.track: !ALIGN)


Style properties (4)

minimized (*FOOTNOTE.minimized: true)

keepwidth (*CAPTION.keepwidth: true)


Style properties (5)

id (*id: !ID)

insertbefore, insertafter (*CENTER.insertbefore: <DIV ALIGN=CENTER>)

math


Expressions

Currently not very well developed
IDs
*@par12*EM.bold: true

an EM within an elt. with ID = ``par12''

attributes
*track: !ALIGN

value taken from ALIGN attribute

conditional
*flush: @ifmatch(!CLEAR, "[Ff].*", "both", !CLEAR)

2nd arg. is reg. exp.

More general expressions needed (in particular concatenation)


External influences

Cf. Cascading stylesheets and DSSSL (``length spec'')

Currently none specified


Odds & ends

&sbsp; (soft break space)

External vs in-line style sheets

Other output formats