mirror of
https://github.com/pybricks/pybricks-code.git
synced 2026-09-12 17:45:22 +00:00
firmware/bootloaderInstructions: Keep counting instructions.
This ensures the instruction step counter does not reset after a heading.
This commit is contained in:
committed by
David Lechner
parent
d303e28756
commit
390cf235de
@@ -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) '. ';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user