firmware/bootloaderInstructions: Keep counting instructions.

This ensures the instruction step counter does not reset after a heading.
This commit is contained in:
Laurens Valk
2022-12-15 14:59:36 -06:00
committed by David Lechner
parent d303e28756
commit 390cf235de
2 changed files with 20 additions and 3 deletions
@@ -209,7 +209,7 @@ const BootloaderInstructions: React.VoidFunctionComponent<
<p>
<strong>{i18n.translate('prepare.start')}</strong>
</p>
<ol>
<ol className="firstList">
<li>
{i18n.translate(
hubHasUSB(hubType) ? 'prepare.usb' : 'prepare.batteries',
@@ -230,7 +230,7 @@ const BootloaderInstructions: React.VoidFunctionComponent<
<p>
<strong>{i18n.translate('step.start')}</strong>
</p>
<ol>
<ol className="continuedList">
{/* City hub has power issues and requires disconnecting motors/sensors */}
{hubType === Hub.City && (
<li
@@ -322,7 +322,7 @@ const BootloaderInstructions: React.VoidFunctionComponent<
<p>
<strong>{i18n.translate('connect.start')}</strong>
</p>
<ol>
<ol className="continuedList">
<li>
{i18n.translate('connect.clickConnectAndFlash', {
flashButton: <strong>{flashButton}</strong>,
@@ -11,3 +11,20 @@
display: block;
margin: 0 auto;
}
// Only first ol should reset.
ol.firstList {
counter-reset: listCounter 0;
}
// Increment on each li, no matter which list.
ol.firstList li,
ol.continuedList li {
counter-increment: listCounter;
}
// Use counter value to set marker, no matter which list.
ol.firstList li::marker,
ol.continuedList li::marker {
content: counter(listCounter, decimal) '. ';
}