| From: | "Jonathan S(dot) Katz" <jkatz(at)postgresql(dot)org> | 
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> | 
| Cc: | pgsql-www(at)lists(dot)postgresql(dot)org | 
| Subject: | Re: Weird table alignment override in website docs style | 
| Date: | 2020-04-14 21:53:13 | 
| Message-ID: | a91cefcf-126f-5da6-166b-2d9fb65eac3a@postgresql.org | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-www | 
On 4/14/20 5:40 PM, Tom Lane wrote:
> "Jonathan S. Katz" <jkatz(at)postgresql(dot)org> writes:
>> The fix is now live:
>> 	https://www.postgresql.org/docs/devel/functions-enum.html
> 
> Hm, looking at
> 
> https://www.postgresql.org/docs/devel/functions-enum.html
> 
> it seems like it's now handling valign=middle for the "Function"
> header, but it's still ignoring align=center for all the headers.
Oops I missed that, sorry.
Doing some research, and from what I recall, align/valign as HTML
properties are technically no longer supported in HTML5 -- you are
supposed to handle this with CSS (text-align & vertical-align
respectively)[1]. The main reason it still works is that browsers still
support that backwards compatibility.
I do have a fix on my local that accounts for this using CSS attribute
selectors to check for that value and then apply it as CSS and it is
safe across browsers. I do wonder if it's more prudent to have a class
on it that I can check for?
For the latter path, the "easiest" way would be to directly use a
Bootstrap class (text-center, align-middle) but that creates tighter
coupling to Bootstrap. If we have some class available, we can fairly
easily hook into that.
I'm ok with any of these approaches. I think it's better if we don't
have deprecated HTML properties floating around (though I know we likely
still have a bunch throughout the codebase), but there is at least a
decent workaround.
Jonathan
[1] https://developer.mozilla.org/en-US/docs/Web/HTML/Element/th
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Jonathan S. Katz | 2020-04-14 22:10:51 | Re: Weird table alignment override in website docs style | 
| Previous Message | Tom Lane | 2020-04-14 21:40:01 | Re: Weird table alignment override in website docs style |