-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed build results page on firefox (part two) #2630
Conversation
…ng selector hack found at http://browserhacks.com/. Now content renders nicely on Chrome and Firefox. Fixes #2261.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd rather avoid using CSS hacks here. Was there any attempt to rework the styling around the parent elements to remove the need for a negative margin in the first place?
I agree it would be preferable without CSS hacks, but I don't have the skills to track down the underlying cause readily. At least this change makes the site usable and sets the stage for someone to devise a better option. |
I should mention that this fixes #2261. |
As proposed in the ticket, I've removed the hack and the |
@agjohnson what more needs to be done here? This has been open for a long time. |
It needs testing. Someone tried a similar fix and it broke all other browser display. Can anyone confirm this works across browsers? |
In this comment, @karlcow asserts that the change has the desired effect. This PR implements that change. |
This fix breaks scrolling on command elements, I can't scroll horizontally to see the command executed. FWIW, FF quantum looks as I would expect |
I still would argue that being able to see the header text is more important than being able to see the trailing portion of longer lines. I'll see if I can find another solution. |
Let me check again. OK Indeed the change as it is will break the scroll. I have something which fixes it. |
@jaraco Could you try this in your PR. Removing the div.build-command div.build-command-run, div.build-command div.build-command-output {
display: block;
/* overflow: hidden; */
} and just removing the div.build-command div.build-command-run > span, div.build-command div.build-command-output > span {
display: block;
/* margin-bottom: -16px; */
font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
white-space: pre;
overflow-x: scroll;
overflow-y: hidden;
} This will fix in both Chrome and Firefox. If I can try to work out a solution which would look the same in both with a change of markup.
|
ok I have a fix which seems to be working everywhere but requires markup change. div.build-command div.build-command-run > pre, div.build-command div.build-command-output > pre {
font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
overflow-x: scroll;
overflow-y: hidden;
line-height: 1.5em;
margin: 0;
}
div.build-command div.build-command-output > pre {
padding: .5em;
} And replace the <div class="build-command build-command-successful"
data-bind="css: command_status">
<div class="build-command-run"
data-bind="click: toggleCommand">
<pre data-bind="text: command">python -mvirtualenv --no-site-packages /home/docs/checkouts/readthedocs.org/user_builds/gratipay/envs/latest</pre>
</div>
<div class="build-command-return"
data-bind="visible: is_showing"
style="">
<div class="build-command-output">
<pre data-bind="text: output">New python executable in /home/docs/checkouts/readthedocs.org/user_builds/gratipay/envs/latest/bin/python
Installing setuptools, pip, wheel...done.
</pre>
</div>
<div class="build-command-meta">
<span class="build-command-time">
Command time:
<span data-bind="text: run_time">2</span>s
</span>
<span class="build-command-exit-code">
Return:
<span data-bind="text: exit_code">0</span>
</span>
</div>
</div>
</div> |
horizontal scrolling is working. The layout is similar in both firefox and chrome. |
- Fixes readthedocs#2261 - Replaces readthedocs#2630
I have an alternative fix in #3569 that doesn't require markup changes. |
Thanks for the investigation and help on this PR everyone! I think #3569 is closer to a fix for this issue, so I'm going to close this PR and we can hopefully merge that PR after some more testing. |
This PR builds on and obviates #2350 by addressing concerns about aesthetics on Chrome, by moving the hack into its own documented style definition.
I did try to track the origin of the original style, but it was part of the bulk commit in a95f08d, which lends no insight into the intention of the style, and is probably just an artifact of the author using Chrome to develop the view.