Skip to content

Conversation

@gitjannes
Copy link
Collaborator

fixes #2098

  • only has approximation to match width of notebook to evap content
  • custom width breakpoint chosen by expert counseling

max-width: 75vw;
margin-left: 25vw;
.notebook-card {
height: calc((100vh - #{$navbar-brand-height}) - (#{$footer-height} + ((#{$spacer} * 1.5) * 5))); // subtract 3 spacer with padding
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment does not match computation

I can visualize 100vh - navbar-height - footer-height, and I would understand subtracting 2 spacer heights, but the factors 1.5 and 5 are a bit unclear to me here

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tried the equation both with 2 spacer heights and the documented 3 spacer heights, it looked wrong. My "solution" now is to change the comment to an educated guess of the purpose.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just now saw that this line was already in the CSS and you just moved it -- GitHub just happens to show this as an added line first. It would be nice to come up with a good explanation of why this makes sense, or finding a better value if it doesn't, but it's not required from you here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

//approximation for similar gap to the footer as evap-Content
is my current understanding of the formula

Comment on lines 46 to 47
display: flex;
justify-content: center;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like we should put direct attributes at the top or bottom, not somewhere in the middle between nested selector blocks (or whatever they are called).

Why do we need these now, if we were happy without them before? This is required to center the top-bottom notebook, right?

@niklasmohrin @janno42 any guidance for "member" ordering here?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

intuitively I would also say that nested blocks should come only after all declarations for the parent, but I will take whatever makes the most natural diff for this PR; currently it looks like things were moved around and I would appreciate if stuff would stay mostly where it is :D

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would expect to find these attributes at the top

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need these now, if we were happy without them before? This is required to center the top-bottom notebook, right?

This centering is necessary to emulate the look of the previous not width-limited top-bottom notebook, since it used to fill out the screen and was centered implicitly.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

necessary to emulate the look of the previous not width-limited top-bottom notebook

okay, but then it should be fine to have them inside the corresponding css media selector, right? I feel like structuring the CSS here like that could possibly help having a good overview of both modes -- but following an approach of getting a minimal diff is probably also fine, but if you need top-level CSS styles, please put them at the top.

display: flex;
justify-content: center;
.notebook-container {
width: 80vw; //approximation to be similar to evap-Content width
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use the exact same value as we use with evap-content? I feel like there should be a way to factor that out into a variable and reuse it here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The exact value would be the same as the one set by the "container" class, adding this to the notebook would lead to the need to suppress a lot of the other properties introduced by that class for the left-right notebook view.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking of putting the "80vh" value into a variable that is then used by container and notebook-container, just like we have done with $notebook-break etc. No need to add extra CSS classes then, we just want to move out the shared magic number into a shared variable

padding: $spacer;
}

@media screen and (min-aspect-ratio: $notebook-break), (min-width: $notebook-break-width) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You inverted the rule logic here. Before, we had the "non-selective" filters match the left-right layout, and then had a more selective ruleset (via media query) that changed it into top-down. Why is it necessary to invert this, what do we gain from that?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My understanding is that there were two checks for both cases previously, and having both checks while introducing the fixed upper limit for the width introduced some weird behaviour when at the border of the checks. This is why I removed one of the checks and made the top-bottom view the default in the code, since the theoretical first instances of the screen at 1x1 px would the top-bottom view.

@niklasmohrin niklasmohrin removed their request for review November 17, 2025 19:14
@janno42
Copy link
Member

janno42 commented Nov 24, 2025

Placing still looks weird in some situations.

Overlapping other content and I think the notebook should have the same width as the content if it's shown on top:
image

Notebook too small (even close button doesn't fit):
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Notebook layouting compatibility with high DPI / widescreen displays

4 participants