wiki.selfhtml.org grid-layout broken - Maybe a browser bug?

For support with specific websites

Moderator: trava90

Forum rules
Please always mention the name/domain of the website in question in your topic title.
Please one website per topic thread (to help keep things organized). While behavior on different sites might at first glance seem similar, they are not necessarily caused by the same.

Please try to include any relevant output from the Toolkit Error Console or the Developer Tools Web Console using the following procedure:
  1. Clear any current output
  2. Navigate or refresh the page in question
  3. Copy and paste Errors or seemingly relevant Warnings into a single [ code ] block.
User avatar
AndieM
Moongazer
Moongazer
Posts: 14
Joined: 2019-04-11, 14:49

wiki.selfhtml.org grid-layout broken - Maybe a browser bug?

Unread post by AndieM » 2025-06-23, 21:47

Pale Moon 33.7.2 (64-bit) (GTK 3)
Debian 12 (stable/Bookworm), using the MX-Repo-Package from Steve Pusser
☑ I tested it with a fresh PM-profile, no add-ons.
https://wiki.selfhtml.org/

Hi,
I'm not sure, if it's a website bug (I'm a bit pessimistic) or a bug in Pale Moon. If it's confirmed, feel free to move this thread.
I just want to make sure, that it's not a problem on my setup first, before opening a bug report.

The selfhtml-wiki (in Germany quite old & known site on html, css, js…) has a layout problem.
It seems like the combined grid-property of the body element is not correctly interpreted, if the width is greater than 40em (…media-query).

As result the layout gets completely broken, with the nav floats above the content, nothing clickable, etc. (See screenshot 1)

The respective css-rule (pretty-printed), looks valid for me, but I am no expert in grid-layout:

Code: Select all

grid: "selfnav selfnav" var(--selfnav-height) 
      "leftnav persnav" auto 
      "leftnav content" auto 
      "leftnav footer " 1fr 
      / var(--mw-panel-width) minmax(1em,60em);
Raw excerpt from the css-file (that is minified…, https://wiki.selfhtml.org/load.php?debu ... n=selfhtml):

Code: Select all

@media (min-width:40em){body{--content-margin-inline:0.75rem;display:grid;grid:"selfnav selfnav" var(--selfnav-height) "leftnav persnav" auto "leftnav content" auto "leftnav footer " 1fr / var(--mw-panel-width) minmax(1em,60em);column-gap:0.7em;padding:0}}
The Error console and the Developer Console are completely empty:

Code: Select all

(none)
It might be a bug in parsing the combined grid-property?

Because if I extract the `grid-template-areas`-part and add it manual with the Inspector (…or via userscript), than the website renders afaict as the property specifies it. (Also adding -rows and/or -columns with the respective content doesn't alters the rendering further for me.)
(Screenshot 2, don't know if the `leftnav`-column is rendered as it intended, but that's another question):

Code: Select all

grid-template-areas: "selfnav selfnav" "leftnav persnav" "leftnav content" "leftnav footer "
Can somebody confirm, that it's a general problem with PM on the website?
Did I miss something?
Off-topic:
Kind of funny …and not :sad:: if you can read up the information on the css properties for the hot fix on the same site that shows the problem…
You do not have the required permissions to view the files attached to this post.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 37763
Joined: 2011-08-28, 17:27
Location: Motala, SE

Re: wiki.selfhtml.org grid-layout broken - Maybe a browser bug?

Unread post by Moonchild » 2025-06-23, 22:50

Not sure who designed that mediawiki theme but I really don't think it will render well in a lot of browsers.
I loaded it up in Edge and even there the site looks half-broken to me and has a really strange page layout. (very similar to the result you achieved with grid templating correction, but with a few more visual effects filled in).
"A dead end street is a place to turn around and go into a new direction" - Anonymous
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
adoxa
Lunatic
Lunatic
Posts: 437
Joined: 2019-03-16, 13:26
Location: Qld, Aus.

Re: wiki.selfhtml.org grid-layout broken - Maybe a browser bug?

Unread post by adoxa » 2025-06-24, 00:29

It doesn't like grid containing var; here's a userstyle to fix it (along with the missing logo, due to unsupported aspect-ratio).

Code: Select all

@-moz-document domain("wiki.selfhtml.org") {
  body {
    grid: "selfnav selfnav" 2.5em "leftnav persnav" auto "leftnav content" auto "leftnav footer " 1fr / 19vw minmax(1em,60em)
  }
  .self-logo {
    height: var(--logo-size)
  }
}
Alternatively, here's a Modify HTTP Response filter, which also fixes colors (unsupported light-dark, assumes light) and the bottom navigation bar (assuming a minimum width of 42em; unsupported @container).

Code: Select all

[["wiki.selfhtml.org",["/mediawiki\\.legacy/",["/aspect-ratio:1/1/g","height:var(--logo-size)","\" var(--selfnav-height)","\" 2.5rem"," var(--mw-panel-width)"," 19vw","/light-dark\\(([^,]*),var\\(.*?\\) ?\\)/g","$1","/var\\(--cont-height\\)/g","3rem","/var\\(--cont-arrow\\)/g","1.5rem","max-width:25em;","max-width:unset;grid:\"prev prev main next next\" 3rem / 1.5rem 1fr 1fr 1fr 1.5rem;"]]]]
It doesn't fix the list links (unsupported :has) nor the paragraph chain icon (svg doesn't support style).