- From: L. David Baron <dbaron@dbaron.org>
- Date: Wed, 25 Apr 2012 08:51:39 -0700
- To: "Kang-Hao (Kenny) Lu" <kennyluck@csail.mit.edu>
- Cc: WWW Style <www-style@w3.org>
On Tuesday 2012-04-10 02:11 +0800, Kang-Hao (Kenny) Lu wrote: > 1. It is a lot more intuitive and less error-prone by specifying "use x, > and then y, and then z..." than "use x if the parent is y...". For > example, css3-lists has > > # /* Default list style types for unordered lists up to 3 deep */ > # ul { list-style-type: disc; } > # ul ul { list-style-type: square; } > # ul ul ul { list-style-type: circle; } > # /* Alternately, if Values & Units Level 3 is supported, replace > # the above three lines with: */ > # ul { list-style-type: cycle(disc, square, circle); } > > in the "Sample style sheet for HTML", which doesn't work without > Proposal B applied because the inherited value I is 'disc' from the > initial value (and people forget that) and so the 'list-style-type' of > the top level <ul> is 'square'. The initial value being 'disc' does make this confusing, though I'd note that the example in the body of the spec [1] and the original cycle() spec text proposal [2] gets this correct: /* cycle between markers for nested lists, so that the top level has disk markers, but nested lists use circle, square, box, and then (for the 5th list deep) repeat */ ul { list-style-type: disk; } li > ul { list-style-type: cycle(disk, circle, square, box); } except for the misspelling of disc as disk. -David [1] http://www.w3.org/TR/2012/WD-css3-values-20120308/#cycle [2] http://lists.w3.org/Archives/Public/www-archive/2009Jan/0001.html -- 𝄞 L. David Baron http://dbaron.org/ 𝄂 𝄢 Mozilla http://www.mozilla.org/ 𝄂
Received on Wednesday, 25 April 2012 15:52:11 UTC