3 ms·
Hmm, can't you use CSS counters that get incremented on every rule and apply a custom, cyclic counter-style to them that contains the symbols you would like? Co
by _Microft 6y ago
Hmm, can't you use CSS counters that get incremented on every rule and apply a custom, cyclic counter-style to them that contains the symbols you would like? Counters work independently of the depth of the element in the tree.
Edit: like that: (sorry in advance, mobile users)
@counter-style rulestyle {
symbols: "*" ")" "+"; /* Symbols go here, images work too. */
system: cyclic;
}
body { /* Initialize counter somewhere. */
counter-reset: rules;
}
hr { /* Style <hr/> as wanted. */
border: none;
text-align: center;
}
hr:before {
counter-increment: rules;
content: counter(rules, rulestyle);
}
Edit 2: according to caniuse.com this seems to be only properly supported in Firefox so far.
- gwern 6y agoI don't know if we discussed it, but FF-only is a dealbreaker. Our usual criterion for breaking changes is supporting >95% of users according to CanIuse.
- _Microft 6y agoUnderstandable that this is a dealbreaker but I do not think we have ever directly interacted before, so you might have misremembered whatever discussion you had in mind.
- gwern 6y agoBy 'we' I mean me and Obormot when we were developing that feature, and to a lesser extent the Pandoc mailing list where I brought the question up as well.