[pmg-devel] [PATCH pmg-gui] css: fix icon/text alignment in panel headers for Firefox

Dominik Csapak d.csapak at proxmox.com
Thu Sep 14 09:00:08 CEST 2023


On 8/9/23 12:07, Christoph Heiss wrote:
> Add `vertial-align: text-top` to all panel header icons - for the
> accompanying text, this already gets set through the `.x-tab-inner`
> class.
> 
> Without this, in Firefox (116.0.1, at least) the icon and the text would
> be slightly offset vertically - due to different baselines, I'd guess.
> Chromium seems fine w/ and w/o the patch, no change there.
> 
> Signed-off-by: Christoph Heiss <c.heiss at proxmox.com>
> ---
>   css/ext6-pmg.css | 4 ++++
>   1 file changed, 4 insertions(+)
> 
> diff --git a/css/ext6-pmg.css b/css/ext6-pmg.css
> index 2f999f4..68e5b7a 100644
> --- a/css/ext6-pmg.css
> +++ b/css/ext6-pmg.css
> @@ -180,6 +180,10 @@ table:not(.x-grid-item-selected) tr.x-grid-row.disabled {
>       height: initial;
>   }
>   
> +.x-tab-icon-el {
> +    vertical-align: text-top;
> +}
> +
>   tr.x-grid-row-summary  td.x-grid-cell {
>       border-top: 1px solid black;
>       font-weight: bold;

i too looked at this, but i guess the exact rendering depends on the installed/used fonts,
since in chrome it had no effect whatsoever and in firefox (102.15.0esr as well as 117.0.1 )
it makes it worse for me?

i played a bit around with both the icon and text alignment, and did not find a setting
that was good both for firefox and chrome.

i think besides shipping a specific font this is not really fixable in general?




More information about the pmg-devel mailing list