Skip to content

Conversation

@miniwater
Copy link
Contributor

Has a fixed width,
But it's not centered.

@netlify
Copy link

netlify bot commented Mar 30, 2025

Deploy Preview for hugo-hextra ready!

Name Link
🔨 Latest commit a48a170
🔍 Latest deploy log https://app.netlify.com/sites/hugo-hextra/deploys/67fb8536eea5630008a6ad46
😎 Deploy Preview https://deploy-preview-649--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 site configuration.

@imfing
Copy link
Owner

imfing commented Mar 31, 2025

I'd recommend doing centering in the custom footer instead of making every custom footer centered.

@imfing imfing closed this Mar 31, 2025
@miniwater
Copy link
Contributor Author

Wait, but the parent div custom player has a fixed width!!!

{{- $footerWidth := "hx-max-w-screen-xl" -}}
{{- with .Site.Params.footer.width -}}
  {{ if eq . "wide" -}}
    {{ $footerWidth = "hx-max-w-[90rem]" -}}
  {{ else if eq . "full" -}}
    {{ $footerWidth = "max-w-full" -}}
  {{ end -}}
{{- end -}}
<div
      class="hextra-custom-footer {{ $footerWidth }} hx-pl-[max(env(safe-area-inset-left),1.5rem)] hx-pr-[max(env(safe-area-inset-right),1.5rem)] hx-text-gray-600 dark:hx-text-gray-400"
    >
</div>
.hx-max-w-screen-xl {
    max-width: 1280px;
}

So,Is there a conflict?

@miniwater
Copy link
Contributor Author

I'd recommend doing centering in the custom footer instead of making every custom footer centered.

When the parent element has a maximum fixed width and is left-aligned, the child element's horizontal centering becomes misaligned within the page layout.

@imfing imfing reopened this Apr 1, 2025
Copy link
Owner

@imfing imfing left a comment

Choose a reason for hiding this comment

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

Thanks, now the custom footer should be consistent with other footer elements

@imfing imfing merged commit f194bc6 into imfing:main Apr 13, 2025
3 of 4 checks passed
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