[Pro] List/Style Numbered

Is that any way to define starting number for the numbered list or to continue numbering from the previous one?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

There used to be a property called start, which you could add to an OL tag to give it the starting number. That’s been deprecated, and the correct way to do this is with generated content in CSS.

Click once on the HTML box that contains your list, and make note of the ID of that box as shown in the Title field of the Inspector. Then open up the Page / HTML Markup dialog, and switch to the Before section of that editor. Paste in the following, making sure to change the ID to match the one you copied from your layout (I’m calling mine item42, in honor of Douglas Adams):

<style type="text/css">
#item42 ol {
  list-style-type: none;
  margin-left: 0;
  counter-reset: num;
}
#item42 ol > li {
  overflow: hidden;
}
#item42 ol > li:before {
  content: counter(num) ". ";
  counter-increment: num;
  width: 40px;
  float:left;
}
</style>

Now all that does is make the ordered list appear the way it normally would. To make it start at a particular number, you need to set the num variable to a specific number. Edit the style to read like this:

<style type="text/css">
#item42 ol {
  list-style-type: none;
  counter-reset: num 8;
  margin-left: 0;
}
#item42 ol > li {
  overflow: hidden;
}
#item42 ol > li:before {
  content: counter(num) ". ";
  counter-increment: num;
  width: 40px;
  float:left;
}
</style>

That second version of the style will make the list start at 9 (one more than whatever you reset the counter to).

Walter

On Dec 26, 2012, at 9:06 PM, Tomek wrote:

Is that any way to define starting number for the numbered list or to continue numbering from the previous one?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

At 21:53 -0500 26/12/12, Walter Lee Davis wrote:

There used to be a property called start, which you could add to an
OL tag to give it the starting number. That’s been deprecated, and
the correct way to do this is with generated content in CSS.

Looks like a case of over zealous CSS warriors. The numbers in
ordered lists are part of the data, not part of the styling. When
putting a club constitution on the web using sub-OLs for sub-sections
makes it work fine as long as it starts at section 1. References to
clauses by number mean that those numbers really are part of the text.

David


David Ledger - Freelance Unix Sysadmin in the UK.
email@hidden
www.ivdcs.co.uk


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I think this is a good point of discussion – should list counters be
considered content or presentation? I notice that when styles are turned
off, the list reverts back to start at 1, so is there any semantic value to
an ordered list?


Ernie Simpson

On Thu, Dec 27, 2012 at 6:12 AM, David Ledger email@hiddenwrote:

At 21:53 -0500 26/12/12, Walter Lee Davis wrote:

There used to be a property called start, which you could add to an OL
tag to give it the starting number. That’s been deprecated, and the correct
way to do this is with generated content in CSS.

Looks like a case of over zealous CSS warriors. The numbers in ordered
lists are part of the data, not part of the styling. When putting a club
constitution on the web using sub-OLs for sub-sections makes it work fine
as long as it starts at section 1. References to clauses by number mean
that those numbers really are part of the text.

David


David Ledger - Freelance Unix Sysadmin in the UK.
email@hidden
www.ivdcs.co.uk

_____________**
freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/**optionshttp://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

At 11:14 -0500 27/12/12, Ernie Simpson wrote:

I think this is a good point of discussion ­ should list counters be
considered content or presentation? I notice that when styles are turned
off, the list reverts back to start at 1, so is there any semantic value to
an ordered list?

Ernie Simpson

The deprecation of the start property indicates the way some would
like it to go. I hope we don’t end up having to use UL tags with
blank markers and type the numbers in. Proper OLs are simple and
quite neat really. In every application I’ve had for OLs having them
auto-generated is a boon, but those values become a part of the data.

David

On Thu, Dec 27, 2012 at 6:12 AM, David Ledger email@hiddenwrote:

At 21:53 -0500 26/12/12, Walter Lee Davis wrote:

There used to be a property called start, which you could add to an OL
tag to give it the starting number. That’s been deprecated, and the correct
way to do this is with generated content in CSS.

Looks like a case of over zealous CSS warriors. The numbers in ordered
lists are part of the data, not part of the styling. When putting a club
constitution on the web using sub-OLs for sub-sections makes it work fine
as long as it starts at section 1. References to clauses by number mean
that those numbers really are part of the text.

David


David Ledger - Freelance Unix Sysadmin in the UK.
email@hidden
www.ivdcs.co.uk


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I don’t think there is a semantic value associated with ordered lists vs.
unordered lists - they both can have the same outline structure, just with
different designators. The value of numbered lists is in the benefit of an
outline map structure (1, 2, a, b, i, ii, etc.) so that users can quickly
find and communicate a bit of it, in which case I can see it being arguable
that if I wanted to reproduce just a portion of such a list that I should
be able to reproduce the number value of it’s original position.

Webkit browsers for now still support the start definition for ordered
lists, and the value definition for li structures. They are worthwhile
checking out, to see how simple they are to implement and compare to
whatever ends up.


Ernie Simpson

On Fri, Dec 28, 2012 at 5:39 AM, David Ledger email@hiddenwrote:

At 11:14 -0500 27/12/12, Ernie Simpson wrote:

I think this is a good point of discussion ­ should list counters be
considered content or presentation? I notice that when styles are turned
off, the list reverts back to start at 1, so is there any semantic value
to
an ordered list?

Ernie Simpson

The deprecation of the start property indicates the way some would like it
to go. I hope we don’t end up having to use UL tags with blank markers and
type the numbers in. Proper OLs are simple and quite neat really. In every
application I’ve had for OLs having them auto-generated is a boon, but
those values become a part of the data.

David

On Thu, Dec 27, 2012 at 6:12 AM, David Ledger email@hidden*

*wrote:

At 21:53 -0500 26/12/12, Walter Lee Davis wrote:

There used to be a property called start, which you could add to an OL

tag to give it the starting number. That’s been deprecated, and the
correct
way to do this is with generated content in CSS.

Looks like a case of over zealous CSS warriors. The numbers in ordered
lists are part of the data, not part of the styling. When putting a club
constitution on the web using sub-OLs for sub-sections makes it work
fine
as long as it starts at section 1. References to clauses by number mean
that those numbers really are part of the text.

David


David Ledger - Freelance Unix Sysadmin in the UK.
email@hidden
www.ivdcs.co.uk

_____________**
freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/**optionshttp://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options