two proposals: predefined styles and rules selecting styles

Scott E. Preece (preece@predator.urbana.mcd.mot.com)
Wed, 13 Dec 1995 10:34:12 -0600


One of the arguments against adding elements like SUP, INS, etc. to HTML
has been that that kind of markup belongs in stylesheets. A number of
people argued instead of, for instance, <INS>newly added text</INS> one
would write <SPAN CLASS=ins>newly added text</SPAN>.

As argued elsewhere, I think it makes more sense to use the STYLE
attribute and reserve CLASS for data-type distinctions, but the argument
seems otherwise sensible.

If we want to encourage the use of stylesheets for this kind of markup,
perhaps we should define CSS to have a collection of built-in styles for
the most common markup - things like subscript, superscript,
line-through, underlined, bigger, smaller, bold, italic, etc. - so
that authors can use them without having to add definitions for them
to their own STYLE element (or even to have a STYLE element if they
don't otherwise need it). Any UA supporting CSS would be required to
provide a default STYLE element containing a standard set of
definitions; a document-provided STYLE element would cascade over the
default, overriding definitions for the built-in styles, if desired.

Coupled with this, I suggest that we modify the STYLE element syntax to
allow using style names in right-hand sides, indicating that all the
properties associated with that named style should be included. This
would allow, for instance:

[CLASS=doctitle] { underlined }
[STYLE=C-keyword] { bold; font-family: helvetica ]

This allows the actual properties associated with, for instance, all
elements whose style includes underlining the text, to be hanged by
changing the definition of the underlined STYLE. For instance, a
stylesheet for a medium not supporting underlining could do something
like

[STYLE-underlined] { background-color: red }

and affect every style rule using the style underlined, rather than
individually overriding every such style rule, as would be required with
thte mechanism in the current draft.

scott

--
scott preece
motorola/mcg urbana design center	1101 e. university, urbana, il   61801
phone:	217-384-8589			  fax:	217-384-8550
internet mail:	preece@urbana.mcd.mot.com