Files
odoo_source/addons/website/static
qsm-odoo 64629a3b4f [FIX] website: allow using bold in blog posts with all fonts
Bootstrap uses `font-weight: bolder` for its `<b>` elements. This is
good... but only works if the "bolder" font is actually referencing
an available one.

Indeed, since we only load 400 and 700 font weights for fonts, see the
following table. CSS values on the left, actual fonts being used on the
right.

```
<p> | <b> | <p> | <b>
----------------------
100   400 | 400   400
200   400 | 400   400
300   400 | 400   400
400   700 | 400   700 -> ok
500   700 | 400   700 -> ok
600   900 | 700   700
700   900 | 700   700
800   900 | 700   700
900   900 | 700   700
```

See how bolder and fallbacks works: [1] and [2].

With most fonts, the rendering of `<b>` was thus only working for elements
using 400 or 500 font-weight. For font-weight > 500, we'll consider
this as a limitation for now: bold area cannot be made bolder.
Font-weights < 400 are however more important as used by some of Odoo
and bootstrap style (e.g. the entire blog posts).

The problem is even deeper as website visitors could have more or
different available font-weights on their computer.

This fix adds the loading of 300 weights for all fonts so that:
- The displayed weights are more consistent across different computers.
- Making a light text bolder through the editor works.

[1]: https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight#Meaning_of_relative_weights
[2]: https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight#Fallback_weights

opw-2226573

closes odoo/odoo#51061

X-original-commit: e7496b923b097f677bef09b890c52b5a680cf53c
Related: odoo/design-themes#277
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-05-11 15:59:16 +00:00
..
…