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

Rework horizontal spacing code to better support embedded notebooks #2903

Merged
merged 2 commits into from
Apr 23, 2024
Merged
Changes from all 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
18 changes: 6 additions & 12 deletions frontend/editor.css
Original file line number Diff line number Diff line change
Expand Up @@ -90,18 +90,12 @@ body:not(.disable_ui) {
/* | main=25px+700px+6px=731px | pluto-helpbox=350px - 500px | */
/* min-width: 731px+ */

/* CAN WE HAVE CONTAINER QUERIES PLESSSSS */
@media screen and (min-width: calc(700px + 25px + 6px)) and (max-width: calc(700px + 25px + 6px + 500px)) {
body:not(.disable_ui) pluto-editor.fullscreen main {
margin-left: 0px;
align-self: flex-start;
}
}
@media screen and (min-width: calc(700px + 25px + 6px + 500px)) and (max-width: calc(700px + 25px + 6px + 500px + 500px)) {
body:not(.disable_ui) pluto-editor.fullscreen main {
margin-right: 500px;
align-self: flex-end;
}
pluto-editor main {
align-self: flex-end;
margin-right: max(
/* First part: center it */ max(0px, (100% - (700px + 25px + 6px)) / 2),
/* Second part: push away from the right to take up all free space */ min((100% - (700px + 25px + 6px)), /* but don't do this more than */ 500px)
);
}

pluto-notebook {
Expand Down
Loading