Skip to content

Commit 25a19d6

Browse files
committed
Realign units with value input
Remove vertical margin from units selection to bring it back in line with the value input. Keep the margin on small screens to correct the caret position.
1 parent 8b8c25b commit 25a19d6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/app/components/content/IsaacNumericQuestion.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import {
1414
Row,
1515
UncontrolledTooltip
1616
} from "reactstrap";
17-
import {above, isAda, isPhy, siteSpecific, useCurrentQuestionAttempt, useDeviceSize} from "../../services";
17+
import {above, below, isAda, isPhy, siteSpecific, useCurrentQuestionAttempt, useDeviceSize} from "../../services";
1818
import {IsaacQuestionProps} from "../../../IsaacAppTypes";
1919
import {Markup} from "../elements/markup";
2020
import classNames from "classnames";
@@ -129,7 +129,7 @@ const IsaacNumericQuestion = ({doc, questionId, validationResponse, readonly}: I
129129
<Dropdown className="flex-grow-1" disabled={readonly} isOpen={isOpen && noDisplayUnit} toggle={() => {setIsOpen(!isOpen);}}>
130130
<DropdownToggle
131131
disabled={readonly || !noDisplayUnit}
132-
className={classNames("feedback-zone w-md-auto h-100 px-2 py-1", {"border-dark display-unit": !noDisplayUnit, "feedback-showing": currentAttemptUnitsWrong && noDisplayUnit, "bg-white my-2": isPhy})}
132+
className={classNames("feedback-zone w-md-auto h-100 px-2 py-1", {"border-dark display-unit": !noDisplayUnit, "feedback-showing": currentAttemptUnitsWrong && noDisplayUnit, "bg-white": isPhy, "my-2": isPhy && below['sm'](deviceSize)})}
133133
color={noDisplayUnit ? siteSpecific("dropdown", undefined) : "white"}
134134
caret={isPhy && noDisplayUnit}
135135
>

0 commit comments

Comments
 (0)