Ordered list syntax.

Lou Quillio public at quillio.com
Sat Mar 27 14:37:59 EST 2004


On Mar 27, 2004, at 5:25 AM, Már Örlygsson wrote:

> No, style rules contained in style="" attributes override all other CSS
> rules, no matter what selector syntax they use. See the chapter on
> 'Calculating a selector's specificity' in the CSS2.1 specs:
> http://www.w3.org/TR/2004/CR-CSS21-20040225/cascade.html#specificity

The conflict I refer to is one where inline styles -- precisely because 
they are hierarchical trump -- unintentionally foul broader 
declarations.  Ordinarily those are just the rules of the road, but 
ordered lists pose a complication.

> P.S. I strongly think that the W3C made a serious mistake by 
> depricating the
> type="" and start="" attributes on <ol> lists. :-(

And.  That's.  The.  Problem.

Because customized list numbering via CSS is awkward (though flexible) 
writers with a frequent need for it would do well to settle on an 
embedded or external classification scheme.  This is particularly true 
for split-ordered lists or any operation involving counters.  It's a 
very tricky business but, if you need it often, it pays to make a plan 
and stick to it.

What happens if MD-generated inline styles instantiate or reset 
counters in conflict with upstream declarations?  Obviously (obviously) 
everything's jake if the text-blob author is 100% consistent.  Anything 
less than 100% is a big mess.

It's all caused by the W3C mistake you cite, but it can't be wished 
away.  So if MD is going to contemplate a syntax for, say, 
split-ordered lists, it must do so with eyes wide open ... and 
Dramamine.

> IMO, Markdown must output explicit, inline markup for ordered list
> properties, because those properties are pure content - not just 
> presentation.

Great.  In consideration of the perils, What is that markup?  I'm as 
disappointed as anybody with the W3C decision, but whaddaya gonna do?  
Rather, what's MD gonna do?

1.  Limit to simple lists
2.  Use the deprecated attributes
3.  Apply inline style attributes automatically (which itself is 
limiting, and introduces conflicts)
4.  Provide a style-attribute syntax (very messy, overly broad, but 
works)
5.  Provide a class-attribute syntax (leaner; no CSS properties to 
manipulate)

The *minimal* way to validly accommodate complex numbering is to 
provide a syntax for class-attribute assignment, which would allow 
users to apply their own schemes.  Most folks could ignore it, but the 
hooks would be there.  Users could share their techniques, but that 
would happen within the general discussion of XHTML/CSS, not MD.  Most 
users don't need it anyhow, but when they do, they do.

I don't propose this casually.  Class pollution is real.  All of the 
options (from an MD perspective) are inelegant but, imo, this would be 
the least limiting, most elegant choice from amongst a bad lot.

Thought experiment:  {.a}
Thought experiment:  {.a_}

Also, let's not forget that MD's referential device is a powerful 
clutter-reducer.  It, too, could be harnessed to this task in clean and 
clever ways.

LQ

++++++++++++++++++++++++++++++++++++
Lou Quillio
P.O. Box 24
Saratoga Springs, NY, USA 12866
518.796.0256 (cell)
http://quillio.com/


More information about the Markdown-discuss mailing list