Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions src/flyout.css
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,20 @@
top: 50px;
}

.container.inline {
width: calc(100% - 20px);
padding: 0 10px;
margin: 0;
position: absolute;
bottom: 0;
}

@media screen and (max-width: 768px) {
.container.inline {
max-width: 100%;
}
}

:host > div {
font-family: var(
--readthedocs-flyout-font-family,
Expand Down
4 changes: 1 addition & 3 deletions src/flyout.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ export class FlyoutElement extends LitElement {
static properties = {
config: { state: true },
opened: { type: Boolean },
floating: { type: Boolean },
position: { type: String },
};

Expand All @@ -37,7 +36,6 @@ export class FlyoutElement extends LitElement {

this.config = null;
this.opened = false;
this.floating = true;
this.position = "bottom-right";
this.readthedocsLogo = READTHEDOCS_LOGO;
}
Expand Down Expand Up @@ -327,7 +325,7 @@ export class FlyoutElement extends LitElement {
}

updateCSSClasses() {
this.classes = { floating: this.floating, container: true };
this.classes = { container: true };
this.classes[this.position] = true;
}

Expand Down
4 changes: 2 additions & 2 deletions tests/__snapshots__/flyout.test.snap.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
export const snapshots = {};

snapshots["Flyout addon snapshot flyout completely"] =
`<div class="bottom-right container floating">
`<div class="bottom-right container">
<header>
<img
alt="Read the Docs"
Expand Down Expand Up @@ -121,7 +121,7 @@ snapshots["Flyout addon snapshot flyout completely"] =
/* end snapshot Flyout addon snapshot flyout completely */

snapshots["Flyout addon snapshot flyout with search disabled"] =
`<div class="bottom-right container floating">
`<div class="bottom-right container">
<header>
<img
alt="Read the Docs"
Expand Down