[FIX] web, project: list renderer alignment top

Prior to this commit some td in the list renderer were vertically align
on the middle while other are aligned on top. This comes from commit[1]

This commit removes the vertical-align: middle to rely on the inherited
alignment from the `<td>` which is inherited until the `<table>` el
which set the alignment on `top`.

To visually center the icons previously centered by vertical-align,
a new variable: `$o-line-size` is created.

This variable accounts for the total size of a line which is the font
size multiplied by the line height.

In our case this ensure that the icons line height in the list view is
the same as the <td> that are containing text.

[1]: odoo/odoo@53f6053997

task-3557566

closes odoo/odoo#145290

X-original-commit: cce036d03ccd7c12f34ed930b8964e26464732ba
Related: odoo/enterprise#52275
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
This commit is contained in:
mano-odoo
2023-12-07 10:07:59 +00:00
parent ad702c20b1
commit 998e40cf07
3 changed files with 10 additions and 1 deletions
@@ -19,6 +19,8 @@
}
.o_task_state_list_view {
height: $o-line-size;
.fa-lg {
font-size: 1.315em;
vertical-align: -6%;
@@ -30,6 +30,10 @@ $o-statusbar-disabled-bg: lighten($o-brand-lightsecondary, 7%) !default;
$o-datepicker-week-bg-color: lighten($o-datepicker-week-color, 30%) !default;
// Computation of the total height of a single line,
// useful to visually center elements eg. in a list view.
$o-line-size: $o-line-height-base * $o-font-size-base !default;
// Form
// Safest for the next value would be map-get($container-max-widths, lg) as it
@@ -78,7 +78,10 @@
display: table-cell;
@include text-truncate();
vertical-align: middle;
.o_field_priority .fa, .o_field_list_activity .fa {
line-height: $o-line-size;
}
&.o_list_text {
white-space: pre-wrap;