Subject: bad style for SECURITY DEFINER

From: Justin Pryzby <[email-masked]>
Date: Sun, 12 Dec 2021 18:17:07 -0600

The title of this section looks poor in the first two web browsers I tried.
https://www.postgresql.org/docs/current/sql-createfunction.html#id-1.9.3.67.10.2
| Writing SECURITY DEFINER Functions Safely

It looks like it may be the only <literal> tag within a <refsect1>.

The PDF looks fine.

-- 
Justin

---

From: Peter Eisentraut <[email-masked]>
Date: Mon, 13 Dec 2021 11:35:49 +0100

> | Writing SECURITY DEFINER Functions Safely

This appears to be a web site styling issue.  It looks more reasonable 
when I use the default style.

---

From: Daniel Gustafsson <[email-masked]>
Date: Mon, 13 Dec 2021 14:11:24 +0100

> On 13 Dec 2021, at 11:35, Peter Eisentraut <[email-masked]> wrote:
> 
> This appears to be a web site styling issue.  It looks more reasonable when I use the default style.

Agreed, the <code> class should not override the font size of the <h2> and
should have a different margin than when rendered elsewhere.  It's not entirely
clear to me why we set a font-size at all, I can't see which case that's
supposed to be fixing but my CSS is really rusty so I'm sure to be missing
something.  However, this should be moved to -www where it can be dealt with.

--
Daniel Gustafsson		https://vmware.com/

---

From: Justin Pryzby <[email-masked]>
Date: Mon, 13 Dec 2021 08:01:10 -0600

> something.  However, this should be moved to -www where it can be dealt with.

So done.

---

From: "Jonathan S. Katz" <[email-masked]>
Date: Mon, 13 Dec 2021 16:33:05 -0500

>>>> | Writing SECURITY DEFINER Functions Safely

The below seems to do the trick. Tested in Chrome, FF, and Safari. 
Screenshot attached.

If no objections I'll push the patch tomorrow.

Thanks,

Jonathan

diff --git a/media/css/main.css b/media/css/main.css
index d97da4d..955f612 100644
--- a/media/css/main.css
+++ b/media/css/main.css
@@ -877,6 +877,10 @@ code,
    font-size: inherit !important;
  }

+#docContent h2 code {
+  margin: 0.5em;
+}
+
  #docContent .NAVHEADER table th,
  #docContent .navheader table th {
    text-align: center;

---

From: Daniel Gustafsson <[email-masked]>
Date: Mon, 13 Dec 2021 22:43:42 +0100

> On 13 Dec 2021, at 22:33, Jonathan S. Katz <[email-masked]> wrote:
> 
> The below seems to do the trick. Tested in Chrome, FF, and Safari. Screenshot attached.
> 

The margin issue looks right but I think the font-size should match the rest of
the title.

---

From: "Jonathan S. Katz" <[email-masked]>
Date: Mon, 13 Dec 2021 17:14:01 -0500

> The margin issue looks right but I think the font-size should match the rest of

Please see attached and below for revision.

I'm not thrilled about the !important override that's needed to deal 
with another !important, but I don't want to try to unweave the 
!important nest given the lack of overall cases of a code block nested 
within h2 title tags.

Jonathan

diff --git a/media/css/main.css b/media/css/main.css
index d97da4d..e7b1455 100644
--- a/media/css/main.css
+++ b/media/css/main.css
@@ -877,6 +877,14 @@ code,
    font-size: inherit !important;
  }

+#docContent h2 code {
+  font-size: inherit !important;
+  margin-bottom: 0em;
+  margin-left: 0.5em;
+  margin-right: 0.5em;
+  margin-top: 0em;
+}
+
  #docContent .NAVHEADER table th,
  #docContent .navheader table th {
    text-align: center;

---

From: Daniel Gustafsson <[email-masked]>
Date: Tue, 14 Dec 2021 10:27:51 +0100

> On 13 Dec 2021, at 23:14, Jonathan S. Katz <[email-masked]> wrote:
> 

I think this looks much better, and it matches how the PDF's are rendered.

> I'm not thrilled about the !important override that's needed to deal with another !important, but I don't want to try to unweave the !important nest given the lack of overall cases of a code block nested within h2 title tags.

Agreed on both counts.

---

From: "Jonathan S. Katz" <[email-masked]>
Date: Tue, 14 Dec 2021 14:07:54 -0500

>> I'm not thrilled about the !important override that's needed to deal with another !important, but I don't want to try to unweave the !important nest given the lack of overall cases of a code block…

Thanks for the review, and thanks to Justin for the report. I've pushed 
this up. It should be available on the next cache refresh.

Thanks,

Jonathan