Skip to content
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

Flyout: define position="inline" #500

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
Open
Prev Previous commit
More CSS tricks
  • Loading branch information
humitos committed Jan 28, 2025
commit bfde1ec1c6de6eb4c49fe65cceca36c02a65f97b
19 changes: 18 additions & 1 deletion src/flyout.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,17 @@
.container {
position: fixed;
max-width: var(--readthedocs-flyout-max-width, 25em);
width: auto;
height: auto;
width: auto;
max-height: calc(100% - 100px);
overflow-y: auto;
line-height: var(--addons-flyout-line-height);
}

.container.closed {
height: 2.5rem;
}

.container.bottom-right:not(.inline) {
right: 20px;
bottom: 50px;
Expand Down Expand Up @@ -52,6 +56,16 @@
overflow: visible;
}

.container.up.inline main {
top: unset;
bottom: 2.5rem;
}

.container.down.inline main {
top: 2.5rem;
bottom: unset;
}

:host > div {
font-family: var(
--readthedocs-flyout-font-family,
Expand Down Expand Up @@ -137,6 +151,9 @@ main {

/* Use full width minus 1em padding added on left and right in `.container.inline main` */
width: calc(100% - 2em);

position: absolute;
margin-top: 0;
}

main.closed,
Expand Down