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-15 09:10:09 +00:00
…
…
…
…
…
…

Build Status Tech Doc Help Nightly Builds

Odoo

Odoo is a suite of web based open source business apps.

The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...

Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.

Getting started with Odoo

For a standard installation please follow the Setup instructions from the documentation.

To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials

S
Description
No description provided
Readme LGPL-3.0
3.4 GiB
Languages
Python 49.6%
JavaScript 47.8%
SCSS 2%
CSS 0.3%
HTML 0.2%