Fix regression affecting the horizontal viewerContainer
offset for small window widths (PR 9816 follow-up)
#9819
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.
The danger of fixing one bug is that it can, sometimes too easily, cause another one in the process; sorry for not catching this when testing PR #9816 locally.
When the entire viewer becomes narrow enough, as controlled by the
@media all and (max-width: 840px)
media query, the sidebar should (semi-transparently) overlay theviewerContainer
instead of moving it horizontally. Unfortunately the changes made in PR #9816 caused the relevant CSS rules to be skipped, because of how the inheritance model works in CSS.I'm well aware that
!important
is usually advised against, since it "breaks" the CSS inheritance model. However in this case it seemed reasonable to use it, to not only fix the bug at hand but to also prevent similar bugs from occurring in the future.