Skip to content

Conversation

@imfing
Copy link
Owner

@imfing imfing commented Aug 14, 2025

fixes #747

@netlify
Copy link

netlify bot commented Aug 14, 2025

Deploy Preview for hugo-hextra ready!

Name Link
🔨 Latest commit a5eae0f
🔍 Latest deploy log https://app.netlify.com/projects/hugo-hextra/deploys/689df9958c1a130008bd3beb
😎 Deploy Preview https://deploy-preview-748--hugo-hextra.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@@ -0,0 +1,7 @@
{{- with .Params.width -}}
<style>
.hextra-max-page-width {
Copy link
Contributor

Choose a reason for hiding this comment

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

I have a naive question: why is the scope .hextra-max-page-width instead of :root?

Copy link
Owner Author

Choose a reason for hiding this comment

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

I didn't think too much as the .hextra-max-page-width class is the only place the css variable is used

now I feel :root is slightly more consistent, will change it.

@ldez
Copy link
Contributor

ldez commented Aug 14, 2025

I think you can also change:

{{- $pageWidth := .Params.width | default .Site.Params.page.width -}}
{{- $maxPageWidth := cond (eq $pageWidth "wide") "90rem" (cond (eq $pageWidth "full") "100%" "80rem") -}}

diff --git i/assets/css/variables.css w/assets/css/variables.css
index 5cc96ac..62dbe6c 100644
--- i/assets/css/variables.css
+++ w/assets/css/variables.css
@@ -1,7 +1,7 @@
 /* Hugo template to derive CSS variables from site and page parameters */
 
 /* Do not remove the following comment. It is used by Hugo to render CSS variables.
-{{- $pageWidth := .Params.width | default .Site.Params.page.width -}}
+{{- $pageWidth := .Site.Params.page.width -}}
 {{- $maxPageWidth := cond (eq $pageWidth "wide") "90rem" (cond (eq $pageWidth "full") "100%" "80rem") -}}
 
 {{- $navbarWidth := .Site.Params.navbar.width -}}

@imfing
Copy link
Owner Author

imfing commented Aug 14, 2025

I think you can also change:

good point 👍

@imfing imfing merged commit eca7665 into main Aug 14, 2025
4 checks passed
@imfing imfing deleted the fix-page-width branch August 14, 2025 15:12
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.

v0.10.0: regression with page width front matter

3 participants