Home Forums General XMetaL Discussion list ordering and display position Reply To: list ordering and display position

LeeHart

Reply to: list ordering and display position

“item” and “conditional__item” are siblings and “conditional__item” may also contain “item”:
  text
  text
  text

That's it. can contain or . can contain item. has another child element that describes where that conditional content should be displayed.

Attached is an example image. The orange numbers inside the element is what I'd like to see in the list numbers outside the elements.

And here's the relevant CSS:
proch:before,
list:before,
item:before {
  color: #FF9900;
  font-style: normal;
}

proch,
list {
  prefix-format: "[ %attribute-list; ] ";
  display: block;
  margin-left: 6pt;
  text-indent: -3pt;
  list-style-position: outside;
}

proch {
  counter-reset: proch;
  list-style-type: decimal;
}

list {
  list-style-type: disc;
}

item {
  prefix-format: "[ %attribute-list; ] ";
  margin-left: 12pt;
  text-indent: -3pt;
  display: list-item;
}

proch > conditional__item > item:before,
proch > item:before {
  content: counter(proch, decimal) ". ";
}

proch > conditional__item > item,
proch > item {
  counter-increment: proch;
}

proch proch {
  list-style-type: lower-alpha;
}

proch proch > conditional__item > item:before,
proch proch > item:before {
  content: counter(proch, lower-alpha) ". ";
}

list[nobullets="1"] {
  list-style-type: none;
}

Reply

Products
Downloads
Support