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

Top bar / header does not scale properly when page font size is changed #1642

Open
brookisme opened this issue Nov 15, 2024 · 5 comments
Open
Labels
bug Something isn't working

Comments

@brookisme
Copy link

myst version: v1.3.17

Hi Everyone - As discussed here the line separating the header from the body is off.

Description

Here is what it looks like on this page:

Image

Looking around for solutions I saw this repeated on other sites. I haven't come across a site that doesn't have this problem.

Proposed solutions

There are multiple possible solutions:

  1. Setting a fixed height for the header. Playing with the CSS using height: 100px looks good to me
  2. Either through proper CSS Settings or some javascript have a variable height that is automatically set correctly
  3. Allow for custom CSS of this (and all elements)

I would strongly push for a combination of either (1) or (2), and (3). I'm guessing (1) would be an easy fix and (3) could be worked on as a future enhancement. My thoughts on (3) are discussed here

Additional notes

To add some urgency in the kindest possible way (I know everyones working hard doing an amazing job with myst), It may seem small but having the first thing users see be a broken header will prevent me from myst in a professional public way. I'm still happy to use it to generate internal presentations or papers but its not something I could push out to a wider audience.

Thanks!

@brookisme brookisme added the bug Something isn't working label Nov 15, 2024
@agoose77
Copy link
Contributor

@brookisme thanks for reporting this. Can you report your browser? I don't see this on the page that you've linked.

We are aware that the choice of breakpoints is sometimes the driver of overflow on intermediate screen sizes (and need to make a pass at that), but this doesn't look like the same issue to me.

@choldgraf
Copy link
Collaborator

Yes this looks normal to me on Arc browser on a macbook:

Image

@brookisme
Copy link
Author

I should have thought to check other browsers.

I'm on a Mac using

Chrome Version 131.0.6778.70 (Official Build) (arm64)

I just checked Safari 16.3 and it doesn't show up there

Image

The Safari view is great - I'd be happy to use it but if I was being nit-picky I'd still want the line pushed slightly down so space above and below the search box were even.

That sort of nit-pickyness might be a good usage of the custom CSS request. Is that worth rolling over into a separate issue/feature-request?

@brookisme
Copy link
Author

I just realized the problem was that I had set my fonts to be large (sadly my eyes aren't aging well).

If I reset my fonts to normal-size the bar appears correctly. Far outside my area of expertise but I'm guessing there is a way to set the CSS so that it works with whatever font size the user has chosen. That said the above mentioned simplicity and urgency have just changed dramatically.

Thanks @agoose77 @choldgraf - do let me know thoughts on the custom CSS which still seems very relevant.

@rowanc1
Copy link
Member

rowanc1 commented Nov 15, 2024

Quite right - we do fix the nav bar in px rather than in rems, which would scale with font size.

@choldgraf choldgraf changed the title Top bar/header off in Book Theme Top bar / header does not scale properly when page font size is changed Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants