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

Prose doesn't fill width of the page #758

Closed
thechubbypanda opened this issue Dec 22, 2023 · 3 comments
Closed

Prose doesn't fill width of the page #758

thechubbypanda opened this issue Dec 22, 2023 · 3 comments
Labels
non-issue Nothing needs to be fixed

Comments

@thechubbypanda
Copy link

thechubbypanda commented Dec 22, 2023

Issue description

I'm aware that this may be a style choice however;

The actual content of an article using the default layout (not simple) doesn't fill the page very well, leaving most of the site completely empty. As an example, the congo docs site.
With no contents pane, all the content is squished on the left.

I found the generated css that is causing this in assets/css/compiled/main.css:

.max-w-prose {
  max-width: 65ch;
}

Unfortunately I don't know tailwind and so can't figure out how to fix this from the source

Theme version

v2.7.6

Hugo version

v0.121.1+extended

Which browser rendering engines are you seeing the problem on?

Firefox (Mozilla Firefox)

URL to sample repository or website

https://jpanther.github.io/congo/samples/icons/

Hugo output or build error messages

No response

@thechubbypanda thechubbypanda added the bug Something isn't working label Dec 22, 2023
@wolfspyre
Copy link
Contributor

While I agree with your preference and also would love to see this shift... I don't want you to think that you need to learn tailwind to address it in the meantime. ;)

( I went down this rabbithole because why not... )

fortunately no tailwind's required!

check out layouts/partials/head.html:

{{ $assets.Add "css" (slice $cssScheme) }}
  {{ $cssMain := resources.Get "css/compiled/main.css" }}
  {{ $assets.Add "css" (slice $cssMain) }}
  {{ $cssCustom := resources.Get "css/custom.css" }}
  {{ if $cssCustom }}
    {{ $assets.Add "css" (slice $cssCustom) }}
  {{ end }}
  {{ $bundleCSS := $assets.Get "css" | resources.Concat "css/main.bundle.css" | resources.Minify | resources.Fingerprint $algorithm }}
  <link
    type="text/css"
    rel="stylesheet"
    href="{{ $bundleCSS.RelPermalink }}"
    integrity="{{ $bundleCSS.Data.Integrity }}"
  />

So... you can overwrite this pretty easily:

assets/css/custom.css:

.prose {
  .table { overflow: hidden;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1; };
},
/*  change prose width for shiggles */
.max-w-prose { max-width:90ch !important; }

and viola!
thine site width be embiggened.

:)

@thechubbypanda
Copy link
Author

thechubbypanda commented Dec 22, 2023

Damn I was over-complicating it, thanks kind stranger.

And as a side note, "shiggles" is now my new favourite word

@jpanther
Copy link
Owner

Thanks for the report however as you suspected, this is a style choice and not a bug. The prose layout is designed for accessibility and ease of readability. CSS overrides are the way to adjust this behaviour.

@jpanther jpanther closed this as not planned Won't fix, can't repro, duplicate, stale Dec 22, 2023
@jpanther jpanther added non-issue Nothing needs to be fixed and removed bug Something isn't working labels Dec 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
non-issue Nothing needs to be fixed
Projects
None yet
Development

No branches or pull requests

3 participants