Files
odoo_source/addons
Julien (jula)andqsm-odoo 3ec555eb38 [FIX] website: prevent crash due to color-mix in Safari 16.5
__Current behavior before commit:__
The `color` attribute of `hr` is set to `$hr-color`[1].
`$hr-color` is equal to `$border-color`[2] which itself is equal to
`--o-border-color`[3].
Finally `--o-border-color` is set using `fade-currentColor()`[4]
which uses the `color-mix` css function on `currentColor`[5].

In short, the `color` of `hr` depends on itself. This creates a circular
reference that makes Safari 16.5 crash.

This bug is caused by WebKit. There seems to be a commit to fix[6]
this bug but it looks like it was not backported to this version of
Safari.

__Description of the fix:__
Set `border-top` color of `hr` to `$border-color`. This way of doing
gives the same result as setting `color` but removes the circular
dependency with `currentColor` that makes Safari 16.5 crash.

`color` is set to `inherit` to override the bootstrap rule[1] that
leads to the bug.

For reference, `hr` color is already set like that here[7].

__Steps to reproduce the issue on runbot:__
1. Go to the website shop using Safari 16.5
2. Add an item to the cart
3. Open the cart view
4. Safari crashes

opw-3806725

[1]: https://github.com/odoo/odoo/blob/1154556/addons/web/static/lib/bootstrap/scss/_reboot.scss#L71
[2]: https://github.com/odoo/odoo/blob/1154556/addons/website/static/src/scss/bootstrap_overridden.scss#L333
[3]: https://github.com/odoo/odoo/blob/1154556/addons/website/static/src/scss/bootstrap_overridden.scss#L91
[4]: https://github.com/odoo/odoo/blob/1154556/addons/website/static/src/scss/website.scss#L35
[5]: https://github.com/odoo/odoo/blob/1154556/addons/website/static/src/scss/primary_variables.scss#L2219
[6]: https://github.com/WebKit/WebKit/commit/0d0b884
[7]: https://github.com/odoo/odoo/blob/1154556/addons/website/static/src/snippets/s_hr/000.scss#L7

Part-of: odoo/odoo#160495
Co-authored-by: qsm-odoo <qsm@odoo.com>
2024-04-17 19:02:39 +00:00
..
2024-04-16 07:02:57 +00:00
2024-04-09 19:35:41 +00:00
2024-03-08 11:17:48 +00:00
2024-02-22 09:06:12 +00:00
2024-03-15 17:30:00 +00:00