Revert overflow-x: auto on .problem-content divs.#1445
Open
drgrice1 wants to merge 1 commit into
Open
Conversation
This was added in openwebwork#1432, but is causing problems. If an answer rule is contained in a `position: relative` parent, then the MathQuill toolbar ends up being positioned correctly, but is contained inside the `.problem-content` div, and so you need to scroll to the right to see it. Note that the `.ww-feedback-container` is `position: relative`. So any answer inside a div with that class will have this issue. An example problem for which the problem occurs is: ``` DOCUMENT(); loadMacros('PGstandard.pl', 'PGML.pl', 'parserMultiAnswer.pl', 'PGcourse.pl'); $ma = MultiAnswer(1, 2)->with(singleResult => 1); BEGIN_PGML [< Enter 1: [_]{$ma}{5} Enter 2: [_]{$ma}{5} >]{ [ class => 'ww-feedback-container ww-fb-align-middle' ] } END_PGML ENDDOCUMENT(); ``` Note that this is not a problem when using the problem editor, since the width of the `.problem-content` div is the same as its parent. So this will need to be tested in an actual set. For now the overflow is left for solutions and hints. Those won't have answer rules, and thus will also not have the MathQuill toolbar issue. So a different way to fix the issue with dark text overflowing into the dark region outside of the problem will need to be found. Any ideas?
Alex-Jordan
approved these changes
Jun 21, 2026
Alex-Jordan
left a comment
Contributor
There was a problem hiding this comment.
I saw the issue with the posted example and I see that this fixes that issue.
As for dark mode, it seems to me that we would just need to actually render the problem for dark mode. So its text (including math) would be white. And the problem background would be dark. I guess this would raise issues with image files that were never considered for dark mode use though.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This was added in #1432, but is causing problems. If an answer rule is contained in a
position: relativeparent, then the MathQuill toolbar ends up being positioned correctly, but is contained inside the.problem-contentdiv, and so you need to scroll to the right to see it. Note that the.ww-feedback-containerisposition: relative. So any answer inside a div with that class will have this issue.An example problem for which the problem occurs is:
Note that this is not a problem when using the problem editor, since the width of the
.problem-contentdiv is the same as its parent. So this will need to be tested in an actual set.For now the overflow is left for solutions and hints. Those won't have answer rules, and thus will also not have the MathQuill toolbar issue.
So a different way to fix the issue with dark text overflowing into the dark region outside of the problem will need to be found. Any ideas?