2 ms·
I have a desktop publishing background and I'd say that CSS is way less convenient than the common desktop publishing styling model. In desktop publishing you a
by Mikhail_Edoshin 9y ago
I have a desktop publishing background and I'd say that CSS is way less convenient than the common desktop publishing styling model. In desktop publishing you assign styles to certain classes of page elements (paragraphs, character runs, graphics, tables, etc.) and you can base a style on another style, that's all. There's no element-element inheritance, only style-to-style inheritance. This is not ideal, I think, but you never get any surprises that are so common in CSS.
If I were to design a better styling model, I'd take that desktop-publishing model and added multiple inheritance (something you can model in XSL-FO with XSLT attribute templates) and maybe tried to have pattern-based rules, but not hierarchical as in CSS. What you normally need is to be able to specify that "add that much space between a table and a paragraph", "remove first line indent if the paragraph comes after a picture", "do not add space if the paragraph is at the top of the page", and so on. All this seems to be based on a particular arrangement of sibling elements, not of parent-child relationship. The only exception I can think of are tables, but they seem to be special anyway.