-
Notifications
You must be signed in to change notification settings - Fork 342
ENH animation for the top banner #1693
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 5 commits
c86ff36
85a166d
c5fd0bb
3c087cd
c99ec05
dd5ceb2
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,34 +1,30 @@ | ||
.bd-header-version-warning, | ||
.bd-header-announcement { | ||
min-height: 3rem; | ||
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 seems to be the one thing about the final appearance that still differs between current 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. (or is there a better approach you can think of?) 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. The suggested solution is clean enough, but I'm thinking perhaps we need still need to add the 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. Okay so experimenting with min-height 10rem we can see that (Only the last 3 seconds of the video is meaningful... something's wrong with my screen recording) The.PyData.Sphinx.Theme.PyData.Theme.0.15.3dev0.documentation.7.-.-.Microsoft.Edge.2024-02-02.02-50-43.mp4 |
||
width: 100%; | ||
display: flex; | ||
position: relative; | ||
align-items: center; | ||
justify-content: center; | ||
text-align: center; | ||
transition: height 300ms ease-in-out; | ||
overflow-y: hidden; | ||
padding: 0.5rem 12.5%; // Horizontal padding so the width is 75% | ||
// One breakpoint less than $breakpoint-sidebar-primary. See variables/_layout.scss for more info. | ||
@include media-breakpoint-down(lg) { | ||
// Announcements can take a bit more width on mobile | ||
padding: 0.5rem 2%; | ||
} | ||
|
||
&.init { | ||
position: fixed; | ||
visibility: hidden; | ||
} | ||
|
||
p { | ||
font-weight: bold; | ||
margin: 0; | ||
} | ||
|
||
&:after { | ||
position: absolute; | ||
width: 100%; | ||
height: 100%; | ||
left: 0; | ||
top: 0; | ||
content: ""; | ||
z-index: -1; // So it doesn't hover over the content | ||
} | ||
|
||
&:empty { | ||
display: none; | ||
} | ||
|
@@ -41,13 +37,9 @@ | |
|
||
// Bg color is now defined in the theme color palette - using our secondary color | ||
.bd-header-announcement { | ||
&:after { | ||
background-color: var(--pst-color-secondary-bg); | ||
} | ||
background-color: var(--pst-color-secondary-bg); | ||
} | ||
|
||
.bd-header-version-warning { | ||
&:after { | ||
background-color: var(--pst-color-danger-bg); | ||
} | ||
background-color: var(--pst-color-danger-bg); | ||
} |
Uh oh!
There was an error while loading. Please reload this page.