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

bs5 feedback #1339

Closed
FingerlessGlov3s opened this issue May 19, 2024 · 8 comments
Closed

bs5 feedback #1339

FingerlessGlov3s opened this issue May 19, 2024 · 8 comments

Comments

@FingerlessGlov3s
Copy link
Contributor

FingerlessGlov3s commented May 19, 2024

The problem

The new bs5 template has fixed width containers for the content of the webpage, where as the old bootstrap theme used to utilise the whole width of the browser. Also when the width is limited it makes the navbar items look strange as they are not in align with the page content.

Utilising the full width of the browser makes more sense when sharing code, less scrolling required, for long lines of code. I personally don't see a benefit in limiting the width of the page.

The solution

Change section elements of the page from using container to container-fluid class.

Alternatives

Use old theme, or create your own custom theme based on bs5 to change the class name

@ppfeufer
Copy link

Same for the footer element …

@elrido
Copy link
Contributor

elrido commented May 19, 2024

This seems to be a choice of the bootstrap framework. Looking at the CSS rules they provide for the .container class, we see in bootstrap 3:

@media (min-width: 992px)
.container {
  width: 970px;
}
@media (min-width: 768px)
.container {
  width: 750px;
}

While in bootstrap 5 it is:

@media (min-width: 992px)
.container, .container-lg, .container-md, .container-sm {
  max-width: 960px;
}
@media (min-width: 768px)
.container, .container-md, .container-sm {
  max-width: 720px;
}
@media (min-width: 576px)
.container, .container-sm {
  max-width: 540px;
}

Changing this to the .container-fluid classes would change it to 100%.

Edit: I found an old PR that addressed this default behavior for the bootstrap 3 template in #501 and here is how the custom CSS looked like:

/* address 2K or 4K monitors when using bootstrap 3 */
@media (min-width: 1280px) {
	.container {
		width: 100%;
		padding-left: 4ch;
		padding-right: 4ch;
	}
}

We should forward-port this to the new template, since the goal is to replicate the older one, but using the new release of bootstrap.

@FingerlessGlov3s
Copy link
Contributor Author

FingerlessGlov3s commented May 19, 2024

Surely the proper fix here is to use fluid containers as it does exactly what we're after, and then add pl-2 and pr-2 classes to add the side padding if that's needed.

Editing it is what we did last time but isn't really the right approach, in my eyes.

@ppfeufer
Copy link

Surely the proper fix here is to use fluid containers as it does exactly what we're after, and then add pl-2 and pr-2 classes to add the side padding if that's needed.

Editing it is what we did last time but isn't really the right approach, in my eyes.

Seconded.
BS5 already provides this class, so there is no need to "fight" against Bootstrap here.

Side padding is ps-* for left and pe-* for right (start and end), btw. But it shouldn't be needed, since container-fluid has a gutter of 1.5rem defined.

image

@FingerlessGlov3s
Copy link
Contributor Author

Surely the proper fix here is to use fluid containers as it does exactly what we're after, and then add pl-2 and pr-2 classes to add the side padding if that's needed.

Editing it is what we did last time but isn't really the right approach, in my eyes.

Seconded.
BS5 already provides this class, so there is no need to "fight" against Bootstrap here.

Side padding is ps-* for left and pe-* for right (start and end), btw. But it shouldn't be needed, since container-fluid has a gutter of 1.5rem defined.

image

Yes it would be, start and end, it was left and right back in BS4 😅

When I changed it to fluid I had no left or right Margin and the border on the viewing of a paste had no margin. How does yours look?

Creating a paste looked ok.

@ppfeufer
Copy link

Form:
image

Preview:
image

that's because of the article row class.
image

If that's removed, it looks ok
image

Same in the Paste view, the row needs to be removed from the article element and it looks good …
image

@rugk
Copy link
Member

rugk commented May 20, 2024

Anyone feel free to submit a PR (with screenshots) to fix it…

@FingerlessGlov3s
Copy link
Contributor Author

Please see PR #1341

@elrido elrido closed this as completed May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants