This repository was archived by the owner on Feb 6, 2023. It is now read-only.
Commit d2a3ae8
Add different counter-style for ordered lists based on their depth
Summary:
Draft.js have only 1 type of counter-style for ordered lists - the numeric.
Current Draft.js:
https://pxl.cl/d7zZ
Quip have a 3 different counter-styles, based on the depth:
https://pxl.cl/d7x6
This can be added by implementing the second argument to the counter function:
content: counter(ol1) ". ";
to:
content: counter(ol1,lower-alpha) ". ";
For more info: https://css-tricks.com/numbering-in-style/
Browser support is excellent: https://developer.mozilla.org/en-US/docs/Web/CSS/list-style-type#Browser_compatibility (for Basic support)
Reviewed By: flarnie
Differential Revision: D7840010
fbshipit-source-id: 6655566baafd9c03468c1b1b7c83bdb5ecf1ada61 parent 06c0ee6 commit d2a3ae8
1 file changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
154 | | - | |
| 154 | + | |
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
159 | | - | |
| 159 | + | |
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
| |||
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
169 | | - | |
| 169 | + | |
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
| |||
0 commit comments