-
Notifications
You must be signed in to change notification settings - Fork 30
Fix Furo side bars & improve footer styling #294
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
Changes from all commits
3aab8c9
066ab73
d19374d
19adeab
4f0e025
5be4084
f17dfc1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,54 @@ | ||
/* Define some Furo variables. See | ||
* https://github.com/pradyunsg/furo/tree/main/src/furo/assets/styles/variables | ||
* for all options. */ | ||
* for all options. | ||
* | ||
* Variables that start with `--qiskit-` are new values we use in this file; they are not overrides. | ||
*/ | ||
body { | ||
--color-brand-primary: #8A3FFC; | ||
--color-brand-content: #8A3FFC; | ||
--font-stack: 'IBM Plex Sans', 'Roboto', 'Helvetica Neue', 'Arial', sans-serif; | ||
--font-stack--monospace: 'IBM Plex Mono', 'Consolas', 'Courier New', monospace; | ||
/* This value is duplicated from `top-nav-bar.js`. Its definition of the variable is not | ||
* exposed globally. Keep in sync. */ | ||
--qiskit-top-nav-bar-height: 3.5rem; | ||
} | ||
|
||
/* ------------------------------ | ||
* User analytics in the footer | ||
* Top nav bar | ||
* ------------------------------ */ | ||
|
||
/* TODO: why won't the border render?? */ | ||
footer .helpful-hr { | ||
border-top: 1px solid rgba(0, 0, 0, 0.1); | ||
/* Fix Qiskit top nav bar hiding Furo's top nav bar when scrolled down. */ | ||
.mobile-header, | ||
.sidebar-sticky, | ||
.toc-sticky { | ||
top: var(--qiskit-top-nav-bar-height); | ||
} | ||
|
||
/* Show the whole contents of the mobile expandable menus. | ||
* `box-sizing: border-box` ensures padding is included in the height calculations. */ | ||
@media (max-width: 67em) { | ||
.sidebar-drawer { | ||
padding-top: var(--qiskit-top-nav-bar-height); | ||
box-sizing: border-box; | ||
} | ||
} | ||
@media (max-width: 82em) { | ||
.toc-drawer { | ||
padding-top: var(--qiskit-top-nav-bar-height); | ||
box-sizing: border-box; | ||
} | ||
} | ||
|
||
/* ------------------------------ | ||
* User analytics in the footer | ||
* ------------------------------ */ | ||
|
||
footer .helpful-container { | ||
display: -webkit-inline-box; | ||
display: -ms-inline-flexbox; | ||
Comment on lines
-21
to
-22
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These should not be necessary. According to https://caniuse.com/?search=inline-flex, inline-flex has been supported by all browsers since 2014. |
||
display: inline-flex; | ||
border-top: 1px solid var(--color-background-border); | ||
border-bottom: 1px solid var(--color-background-border); | ||
color: var(--color-foreground-secondary); | ||
} | ||
|
||
footer .helpful-container .helpful-question, | ||
|
@@ -36,6 +64,7 @@ footer .helpful-container .was-helpful-thank-you { | |
.helpful-container .helpful-question.no-link { | ||
color: #8B34FC; | ||
cursor: pointer; | ||
text-decoration: none; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This turns off underlining so that we match the Pytorch theme. |
||
} | ||
|
||
.helpful-container .helpful-question.yes-link:hover, | ||
|
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.
See #295 for an explanation of why we take this approach.
Unlike #295, this uses a more unique variable name so that we don't override Furo's
--header-height
.