- From: Glenn Adams <glenn@stonehand.com>
- Date: Wed, 29 Nov 95 23:22:32 -0500
- To: Hakon Lie <Hakon.Lie@sophia.inria.fr>
- Cc: www-style@w3.org
> You raise an important point. We could extend the generality by > improving addressing while simplifying properties. E.g., if we can > address characters and lines on the left side, we could drop the > alternate set of properties: > > P:char[1] { text-effect: drop-cap } > > P:line[1:2] { font-size: 120% } -- the first and second line -- I believe this is the wrong way to go about doing this and that this method would produce considerable difficulty for implementors (myself being one). At the Paris workshop, I suggested an alternative way to address this which I'm afraid I haven't had time to elaborate for this forum. The basic idea is to employ a structured specification for property names rather than the flat namespace used now. For example, in our style manager, we employ a destructured style property namespace which employs the notion of a styled part. A styled part consists of a key and a value. The key consists of the following components: part part-subset subpart subpart-subset property Both part and subpart components may be wildcards or a token that specifies a specific part or subpart of a part. In the case that more than one part or subpart of the same kind exists, then the part-subset and subpart-subset permit more specificity. Parts and subparts denote layout objects rather than flow objects; that is, they denote areas or subareas produced by the proceess of formatting a flow object. For a paragraph flow object, one can identify a variety of parts and subparts; e.g., background margins borders lines sub-lines glyphs So, given the following notation: part '.' part-subset '.' subpart '.' subpart-subset '.' property we can specify: (1) fancy dropped cap glyph.1...drop : 3 -- drop 3 lines -- glyph.1.pad.right : 8pts -- add space to right -- glyph.1.pad.bottom : 8pts -- add space below -- glyph.1.body..color : red -- stroke glyph body red glyph.1.outline..color : green -- stroke glyph outline green glyph.1.background.color : gray -- paint background gray Here I use 'glyph' as a part. The part-subset specifies the 1st glyph produced when formatting the current element. (2) swash starts and ends of odd lines line.odd.glyph.^.subst : swash -- enable 'swash' substitutions - line.odd.glyph.$.subst : swash -- enable 'swash' substitutions -- Here I use line as a part, with the part-subset expressing a built-in set of (odd) indices. I use glyph as a sub-part, with the subpart-subset taking the form of standard regexp syntax to express first and last glyphs (on the line). (3) small caps on first line except for first glyph (which is presumably using a drop cap style like (1) above) line.1.glyph.[^1].subst : small-cap -- enable 'small-cap' substitutions -- Here the subpart-subset specifies all glyphs but the first glyph. --------------- Many of the current CSS style properties could be expressed more clearly by using expressions which distinguish between the various layout areas or graphical objects which result from formatting and the basic properties which apply to those areas/objects. For example, the margins, paddings, and borders associated with the areas (boxes) used to format an element are all essentially distinct graphical objects each having its own set of intrinsic properties (size, color, etc.) The set of all such intrinsic properties is actually quite small and can be considerably reduced by extracting the layout part/subpart to which the property applies from the property name as is currently used in CSS. Regards Glenn Adams
Received on Wednesday, 29 November 1995 23:22:59 UTC