-
Notifications
You must be signed in to change notification settings - Fork 29
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
Furo looks bad with methods on same page as class #466
Milestone
Comments
Eric-Arellano
added a commit
that referenced
this issue
Jul 11, 2023
## Background We're planning to switch some Qiskit projects to stop having dedicated HTML pages per method, mostly due to performance concerns. ## Styling changes Closes #466. Methods were using `inline-block` rather than `block` when on the classes page, which resulted in a bug when highlighting over the method to show the `#` anchor tag: ![Screenshot 2023-07-07 at 11 25 45 AM](https://github.com/Qiskit/qiskit_sphinx_theme/assets/14852634/004da4c0-3702-4cd7-9601-5baa46a992a7) Instead, we now turn off floating of the `[source]` label because it causes issues on long code signatures: ![Screenshot 2023-07-07 at 3 02 44 PM](https://github.com/Qiskit/qiskit_sphinx_theme/assets/14852634/19c45f5a-8fc7-44f5-a9d8-997b9a0bfa6e) After: ![Screenshot 2023-07-07 at 3 03 08 PM](https://github.com/Qiskit/qiskit_sphinx_theme/assets/14852634/55e865c9-b376-40e0-846d-cfdd4b1efd1a) Even though the `[source]` floating to the right is more "elegant", we have too many long signatures in Qiskit to be worth it. It's safer to turn off the float. This also improves the information hierarchy so that page feels less crowded. Relates to #459: * Use a border-width of 2px for top-level code objects, but otherwise 1 * Increases the font sizes so headings look bigger.
Eric-Arellano
added a commit
to Eric-Arellano/qiskit_sphinx_theme
that referenced
this issue
Jul 11, 2023
We're planning to switch some Qiskit projects to stop having dedicated HTML pages per method, mostly due to performance concerns. Closes Qiskit#466. Methods were using `inline-block` rather than `block` when on the classes page, which resulted in a bug when highlighting over the method to show the `#` anchor tag: ![Screenshot 2023-07-07 at 11 25 45 AM](https://github.com/Qiskit/qiskit_sphinx_theme/assets/14852634/004da4c0-3702-4cd7-9601-5baa46a992a7) Instead, we now turn off floating of the `[source]` label because it causes issues on long code signatures: ![Screenshot 2023-07-07 at 3 02 44 PM](https://github.com/Qiskit/qiskit_sphinx_theme/assets/14852634/19c45f5a-8fc7-44f5-a9d8-997b9a0bfa6e) After: ![Screenshot 2023-07-07 at 3 03 08 PM](https://github.com/Qiskit/qiskit_sphinx_theme/assets/14852634/55e865c9-b376-40e0-846d-cfdd4b1efd1a) Even though the `[source]` floating to the right is more "elegant", we have too many long signatures in Qiskit to be worth it. It's safer to turn off the float. This also improves the information hierarchy so that page feels less crowded. Relates to Qiskit#459: * Use a border-width of 2px for top-level code objects, but otherwise 1 * Increases the font sizes so headings look bigger.
Eric-Arellano
added a commit
that referenced
this issue
Jul 11, 2023
…k of #458) (#478) We're planning to switch some Qiskit projects to stop having dedicated HTML pages per method, mostly due to performance concerns. Closes #466. Methods were using `inline-block` rather than `block` when on the classes page, which resulted in a bug when highlighting over the method to show the `#` anchor tag: ![Screenshot 2023-07-07 at 11 25 45 AM](https://github.com/Qiskit/qiskit_sphinx_theme/assets/14852634/004da4c0-3702-4cd7-9601-5baa46a992a7) Instead, we now turn off floating of the `[source]` label because it causes issues on long code signatures: ![Screenshot 2023-07-07 at 3 02 44 PM](https://github.com/Qiskit/qiskit_sphinx_theme/assets/14852634/19c45f5a-8fc7-44f5-a9d8-997b9a0bfa6e) After: ![Screenshot 2023-07-07 at 3 03 08 PM](https://github.com/Qiskit/qiskit_sphinx_theme/assets/14852634/55e865c9-b376-40e0-846d-cfdd4b1efd1a) Even though the `[source]` floating to the right is more "elegant", we have too many long signatures in Qiskit to be worth it. It's safer to turn off the float. This also improves the information hierarchy so that page feels less crowded. Relates to #459: * Use a border-width of 2px for top-level code objects, but otherwise 1 * Increases the font sizes so headings look bigger.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See
The specific problem is when you highlight over the header for the method, a
#
anchor pops up. That overlaps with the[source]
button. This is why we have this rule in our CSS atm:qiskit_sphinx_theme/src/qiskit_sphinx_theme/assets/styles/_api.scss
Lines 17 to 37 in 10fff40
But that assumes we have one "code object" per HTML page. We somehow need to handle multiple code objects, specifically when there is the
[source]
button.The text was updated successfully, but these errors were encountered: