From: | Ilia Evdokimov <ilya(dot)evdokimov(at)tantorlabs(dot)com> |
---|---|
To: | pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: stylesheet-html-common: only apply Bootstrap container classes in website build |
Date: | 2025-08-07 15:23:15 |
Message-ID: | 69ea7fd3-2044-4814-aa84-2fb949faab16@tantorlabs.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 09.07.2025 15:40, Lev Nikolaev wrote:
> Hi hackers,
>
> Currently the `body.attributes` template in
> doc/src/sgml/stylesheet-html-common.xsl unconditionally adds
> `class="container-fluid col-10"` to every HTML output. Those classes only
> make sense when the “website” stylesheet (docs-complete.css, which
> includes Bootstrap’s grid) is actually loaded, i.e. when you build with
>
> make STYLE=website html
>
> In a normal local build (`make html`), `$website.stylesheet` is zero,
> docs-complete.css is not pulled in, and the Bootstrap classes are
> “hanging” in the markup without any effect. This can confuse both
> users and downstream tooling, and generally clutters the output with
> unused attributes.
>
> This patch wraps that `<xsl:attribute name="class">container-fluid
> col-10</xsl:attribute>`
> inside an `<xsl:if test="$website.stylesheet != 0">…</xsl:if>` so that
> the
> container classes are only emitted when the website CSS bundle is in use.
> Local builds remain unchanged (no container classes), while
> `STYLE=website`
> builds continue to get the proper 10/12-column layout.
>
> Equipment tested:
>
> - `make html` produces <body id="docContent"> with no class attribute
> - `make STYLE=website html` produces
> <body id="docContent" class="container-fluid col-10"> and
> the docs-complete.css bundle correctly constrains the width
>
> Discussion:
> This keeps the default (offline) documentation clean of
> Bootstrap-specific
> markup, but preserves the exact site look when desired.
>
> Any feedback or suggestions are very welcome!
>
> --
> Best wishes,
> Lev Nikolaev,
> Tantor Labs LLC
+1
Running 'make html' I see in, for example, "regress.html" file:
Before patch: <body id="docContent" class="container-fluid col-10">
After patch: <body id="docContent">
--
Best regards,
Ilia Evdokimov,
Tantor Labs LLC.
From | Date | Subject | |
---|---|---|---|
Next Message | Andrey Borodin | 2025-08-07 15:54:45 | Re: VM corruption on standby |
Previous Message | Aleksander Alekseev | 2025-08-07 15:17:17 | Re: VM corruption on standby |