![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Looking through the draft I still can't figure out how one could (is it possible to) group several elements and style a generated containing block for the group. This is much similar to a typical HTML structure: H1 P H2 P H3 P H2 P P So an application processing this document would "generate" the following containers: one containing the H1 element and everything bellow, a nested containers for the two H2 elements grouped with elements following them (delimited by the appearance of the H2 elements), etc. I say "generate" because an application is not necessary to display the document but only to process the data and generate an outline (for internal processing use) with the specified algorithm. |
#3
| |||
| |||
|
|
CSS is about presentation, not about transformation. The latter is the job of e.g. XSLT. |
|
Additionally note, that it is generated _content_ not generated _structure_. |
utside
#4
| |||
| |||
|
|
A similar case is with the definition list and DT and DD elements in HTML: DL DT DD DT DD DT DD /DL It would be nice if CSS could select a DT element grouped with all next (DD) elements till reaching next DT element and generate a box to apply some formatting. |
#5
| |||
| |||
|
|
On Wed, 29 Oct 2003 13:15:30 +0200, Stanimir Stamenkov <s7an10 (AT) netscape (DOT) net> wrote: It would be nice if CSS could select a DT element grouped with all next (DD) elements till reaching next DT element and generate a box to apply some formatting. Easy enough to do if you use definition lists in a much *better* way. Each list as a list of definitions for one thing. You do the grouping at the DL element (applying a style to it as a whole), not within it. |
#6
| |||
| |||
|
|
Thank you for the good example. May be mine wasn't so successful. Do you have a "solution" for the first case (with heading elements), aside from using additional elements to delimit sections? |
|
If CSS propose extended syntax for specifying such groupings I wouldn't need to put such extra markup and I would easily group the "header" and "content" lately when I change my mind about the general layout. |
#7
| |||
| |||
|
|
On Thu, 30 Oct 2003 16:15:27 +0200, Stanimir Stamenkov <s7an10 (AT) netscape (DOT) net> wrote: If CSS propose extended syntax for specifying such groupings I wouldn't need to put such extra markup and I would easily group the "header" and "content" lately when I change my mind about the general layout. I think that'd be harder, you'd have to make rules that certain sections were made up of certain elements (e.g. a H2 followed by three P elements), and have to write your HTML in that special way. |
#8
| |||
| |||
|
|
If CSS propose extended syntax for specifying such groupings I wouldn't need to put such extra markup and I would easily group the "header" and "content" lately when I change my mind about the general layout. |
|
I think that'd be harder, you'd have to make rules that certain sections were made up of certain elements (e.g. a H2 followed by three P elements), and have to write your HTML in that special way. |
|
I've posted the issue on the "www-style" mailing list at w3.org. You could take a look at the replies if you're interested: http://lists.w3.org/Archives/Public/...3Oct/0319.html |
#9
| |||
| |||
|
|
Stanimir Stamenkov <s7an10 (AT) netscape (DOT) net> wrote: http://lists.w3.org/Archives/Public/...3Oct/0319.html I've had a look (web forums, yuck - tedious and can't be done off-line), |
#10
| |||
| |||
|
|
Stanimir Stamenkov <s7an10 (AT) netscape (DOT) net> wrote: http://lists.w3.org/Archives/Public/...3Oct/0319.html I've had a look (web forums, yuck - tedious and can't be done off-line), and the suggestions follow the same train as I made: That if you have distinct sections to some data, you need to delimit them at the content (such as classed DIVs in the HTML, or custom XML elements), sub-dividing the data, itself. You apply the separate styles on top of the delineations. It'd be hard pressed for something else to figure out where the separations lay, just by guessing at some of the types of structures used in each section. Styling should be applied to things based on content, not the other way around (e.g. style the head, because it's the head, not guess where a head might be and make it look like one). |
![]() |
| Thread Tools | |
| Display Modes | |
| |