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

fix: Do not rely on JavaScript to determine header width #168

Merged
merged 1 commit into from
May 21, 2020

Conversation

palant
Copy link
Collaborator

@palant palant commented May 20, 2020

Currently, without JavaScript the header stays invisible (opacity: 0). The other issue: if you load the page while the browser window is small and maximize it then, the header will stay narrow and wrapped onto multiple lines. Both issues are due to the hack measuring .inner-width for the header size.

Let's go with a CSS-only solution instead?

@reuixiy reuixiy self-requested a review May 20, 2020 16:00
Copy link
Owner

@reuixiy reuixiy left a comment

Choose a reason for hiding this comment

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

Nice!

@palant palant merged commit 820e0ab into master May 21, 2020
@palant palant deleted the header-width branch May 21, 2020 06:08
@palant
Copy link
Collaborator Author

palant commented Jun 8, 2020

For reference, there is a CSS minification issue caused by this change - calc() function isn't being minified, all comments also remain in place. I finally took the time to look into this and found it to be a limitation of the minifier used (https://github.com/tdewolff/minify). It has been resolved in version 2.7.0 but Hugo currently still uses version 2.6.2. Given that this is minor and should go away "by itself" eventually, not worth addressing IMHO.

@reuixiy
Copy link
Owner

reuixiy commented Jun 9, 2020

Thanks for the reminder!

Given that this is minor and should go away "by itself" eventually, not worth addressing IMHO.

Yeah, let it be :)

ulmefors pushed a commit to ulmefors/hugo-theme-meme that referenced this pull request Nov 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants