Обсуждение: Re: bad style for SECURITY DEFINER

Поиск
Список
Период
Сортировка

Re: bad style for SECURITY DEFINER

От
"Jonathan S. Katz"
Дата:
On 12/13/21 9:01 AM, Justin Pryzby wrote:
> On Mon, Dec 13, 2021 at 02:11:24PM +0100, Daniel Gustafsson wrote:
>>> On 13 Dec 2021, at 11:35, Peter Eisentraut <peter.eisentraut@enterprisedb.com> wrote:
>>>
>>> On 13.12.21 01:17, Justin Pryzby wrote:
>>>> 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

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;


Вложения

Re: bad style for SECURITY DEFINER

От
Daniel Gustafsson
Дата:
> On 13 Dec 2021, at 22:33, Jonathan S. Katz <jkatz@postgresql.org> wrote:
>
> On 12/13/21 9:01 AM, Justin Pryzby wrote:
>> On Mon, Dec 13, 2021 at 02:11:24PM +0100, Daniel Gustafsson wrote:
>>>> On 13 Dec 2021, at 11:35, Peter Eisentraut <peter.eisentraut@enterprisedb.com> wrote:
>>>>
>>>> On 13.12.21 01:17, Justin Pryzby wrote:
>>>>> 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
>
> The below seems to do the trick. Tested in Chrome, FF, and Safari. Screenshot attached.
>
> If no objections I'll push the patch tomorrow.

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

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




Re: bad style for SECURITY DEFINER

От
"Jonathan S. Katz"
Дата:
On 12/13/21 4:43 PM, Daniel Gustafsson wrote:

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

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;


Вложения

Re: bad style for SECURITY DEFINER

От
Daniel Gustafsson
Дата:
> On 13 Dec 2021, at 23:14, Jonathan S. Katz <jkatz@postgresql.org> wrote:
>
> On 12/13/21 4:43 PM, Daniel Gustafsson wrote:
>
>> The margin issue looks right but I think the font-size should match the rest of
>> the title.
>
> Please see attached and below for revision.

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
tounweave the !important nest given the lack of overall cases of a code block nested within h2 title tags. 

Agreed on both counts.

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




Re: bad style for SECURITY DEFINER

От
"Jonathan S. Katz"
Дата:
On 12/14/21 4:27 AM, Daniel Gustafsson wrote:
>> On 13 Dec 2021, at 23:14, Jonathan S. Katz <jkatz@postgresql.org> wrote:
>>
>> On 12/13/21 4:43 PM, Daniel Gustafsson wrote:
>>
>>> The margin issue looks right but I think the font-size should match the rest of
>>> the title.
>>
>> Please see attached and below for revision.
> 
> 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
tryto unweave the !important nest given the lack of overall cases of a code block nested within h2 title tags.
 
> 
> Agreed on both counts.

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

Вложения