Re: [css-d] Ordered and Unordered Lists
On Wed, Nov 5, 2008 at 1:45 PM, Jukka K. Korpela [EMAIL PROTECTED] wrote: Drew Trusz wrote: No an ordered list can't have a disc and an unordered list can't be numbered. Of course they can. Whether you should style them that way is debatable, but surely you can, by the specs and in practice. When in doubt read the specs: HTML specs only specify a suggested default rendering of documents, even though they may nominally sound like saying otherwise. And CSS specs explicitly say that all elements have all properties. You can set them to any values you like. Not all properties have visible effect in all situations, but this depends on CSS specs, not HTML specs. For example, you can style a list so that it has neither numbers nor bullets, or you can style non-list elements in a list-like manner. Again, this might not be a wise move, but it's surely possible. You are so right! An author can use css to invert, divert or pervert html and vice versa. And yes indeed specs are really suggestions not requirements. But if you are unsophisticated, simple-minded and pretty much literal about specs like me, then the answer to Doug's question of why you can't use any list style on any list item is that the rules (the suggestions) say a list of a particular type has a specific meaning and should be rendered in a certain way. From this perspective, using styles properly reserved for one list on another list type is a no-no. But hey, if really wanted to, you could do an entire page as a series of lists. Mix and match as you wish. drew __ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Re: [css-d] Ordered and Unordered Lists
On Tue, Nov 4, 2008 at 3:12 PM, Doug Jolley [EMAIL PROTECTED] wrote: I just noticed that apparently the full spectrum of list-style-types apply equally to both ordered lists and unordered lists. So, ordered lists can have a list-style-type of disc and unordered lists can have a list-style-type of decimal. Does anyone see any reason why ALL list-style-types can't be applied to both ordered and unordered lists? I guess the only reason that we have 2 types of lists is backward compatibility. No an ordered list can't have a disc and an unordered list can't be numbered. When in doubt read the specs: Ordered and unordered lists are rendered in an identical manner except that visual user agents number ordered list items. User agents may present those numbers in a variety of ways. Unordered list items are not numbered. http://www.w3.org/TR/html401/struct/lists.html#edef-UL Under the heading 10.3.1 Visual rendering of lists the specs make the distinction clearer by specifiying the available type attributes for both ol and ul. Structurally then, the list-style-type indicates what type of list it is and how the list information should be understood. CSS bundles all the options but not all can be applied to each form of list. It takes two to tango. drew __ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Re: [css-d] Ordered and Unordered Lists
Also, going back to its HTML history, screen readers (for the handicapped) recognize the inherent 'orderliness' of a ol, over an ul. IMHO, listing the ingredients needed in a recipe need not have the same precedence as the recipe instructions. Two cents poorer, Keith D. __ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Re: [css-d] Ordered and Unordered Lists
Drew Trusz wrote: No an ordered list can't have a disc and an unordered list can't be numbered. Of course they can. Whether you should style them that way is debatable, but surely you can, by the specs and in practice. When in doubt read the specs: HTML specs only specify a suggested default rendering of documents, even though they may nominally sound like saying otherwise. And CSS specs explicitly say that all elements have all properties. You can set them to any values you like. Not all properties have visible effect in all situations, but this depends on CSS specs, not HTML specs. For example, you can style a list so that it has neither numbers nor bullets, or you can style non-list elements in a list-like manner. Again, this might not be a wise move, but it's surely possible. -- Yucca, http://www.cs.tut.fi/~jkorpela/ __ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Re: [css-d] Ordered and Unordered Lists
the distinction clearer by specifiying the available type attributes for both ol and ul. And I think that if you do it with the type attribute, you are indeed limited. Including a 'type=disc' attribute in an ol element is undoubtedly going to cause the document to fail validation. However, I really don't see any problem with doing it with a style. Thanks again to everyone for the input. ... doug __ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Re: [css-d] Ordered and Unordered Lists
Doug Jolley wrote: Including a 'type=disc' attribute in an ol element is undoubtedly going to cause the document to fail validation. No it isn't. Check it. (It passes validation, because the type attribute in ol is declared as CDATA, which pretty much means anything goes as far as validation is concerned.) But that's about HTML, not CSS. However, I really don't see any problem with doing it with a style. You don't? Even after considering what happens when CSS is off? -- Yucca, http://www.cs.tut.fi/~jkorpela/ __ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
[css-d] Ordered and Unordered Lists
I just noticed that apparently the full spectrum of list-style-types apply equally to both ordered lists and unordered lists. So, ordered lists can have a list-style-type of disc and unordered lists can have a list-style-type of decimal. Does anyone see any reason why ALL list-style-types can't be applied to both ordered and unordered lists? I guess the only reason that we have 2 types of lists is backward compatibility. Thanks for any input. ... doug __ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Re: [css-d] Ordered and Unordered Lists
On Tue, Nov 4, 2008 at 2:12 PM, Doug Jolley [EMAIL PROTECTED] wrote: I just noticed that apparently the full spectrum of list-style-types apply equally to both ordered lists and unordered lists. So, ordered lists can have a list-style-type of disc and unordered lists can have a list-style-type of decimal. Does anyone see any reason why ALL list-style-types can't be applied to both ordered and unordered lists? I guess the only reason that we have 2 types of lists is backward compatibility. Thanks for any input. ... doug Doug, So far as markup is concerned, there is a good reason for ul and ol to me. ul = Here's a bunch of garbage in no particular order ol = I spent time putting this in order, so it needs to be noted. Style wise, I can see using an ul with decimal styling if you're not concerned with the markup showing that it's supposed to be in a particular order, you just want the users blessed with style to have the convenience of seeing your cherished list to be in an apparent numerical order. Ultimately, where styles are concerned, I don't see a reason why not. Others more qualified may have a different opinion, but I believe it matters in the markup: ul if you don't care, and ol if you do. -- -Jack Timmons http://www.trotlc.com __ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Re: [css-d] Ordered and Unordered Lists
--- On Tue, 11/4/08, Doug Jolley [EMAIL PROTECTED] wrote: I just noticed that apparently the full spectrum of list-style-types apply equally to both ordered lists and unordered lists. So, ordered lists can have a list-style-type of disc and unordered lists can have a list-style-type of decimal. Does anyone see any reason why ALL list-style-types can't be applied to both ordered and unordered lists? I guess the only reason that we have 2 types of lists is backward compatibility. Obviously, in context, one will make semantic sense more than the other. I guess it would be too much of a special case to restrict the values depending on element. It does raise an interesting question of quite how browsers should handle decimal on an unordered list. __ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Re: [css-d] Ordered and Unordered Lists
Doug Jolley wrote: I just noticed that apparently the full spectrum of list-style-types apply equally to both ordered lists and unordered lists. Right. In rendering, ol and ul differ just on the default value (as per a browser style sheet, real or fictional) for the list-style-type property. Theoretically, they might have other default differences as well, but I haven't encountered any. So, ordered lists can have a list-style-type of disc and unordered lists can have a list-style-type of decimal. Yes. Does anyone see any reason why ALL list-style-types can't be applied to both ordered and unordered lists? Pardon? You just said in the first statement that they can. I guess the only reason that we have 2 types of lists is backward compatibility. It's part of the history of HTML, not CSS, and it has some justification, since the difference between ol and ul can be regarded as structural, in some sense at least. As a more practical point, when CSS support is off, ol will appear (probably) with numbers and ul with bullets, so it makes difference which one you have used. One reason to switch off CSS support is that many pages look better that way, or at least more readable. Another reason to turn off _author_ style sheets is that special rendering situations, like very small displays, may require special browser or user style sheets, and in practice you might then need to switch off all or most of author styling. -- Yucca, http://www.cs.tut.fi/~jkorpela/ __ css-discuss [EMAIL PROTECTED] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/