[FIX] website: review default hr color

By default, Bootstrap uses a solid color and dim the element by setting
`$hr-opacity` to `0.25`[1].
Our design comes with a color that is "dimmed by default" since:

```scss
$hr-color ← $border-color ← rgba(currentColor, .25)
```
This commit therefore sets `$hr-opacity: 1 !default`.

At the same time, this also removes the hr background-color that
Bootstrap sets, otherwise it conflicts with the transparent color we are
adding on top of it.

[1]: https://github.com/odoo/odoo/blob/1154556/addons/web/static/lib/bootstrap/scss/_variables.scss#L664

closes odoo/odoo#160495

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Co-authored-by: qsm-odoo <qsm@odoo.com>
This commit is contained in:
Julien (jula)
2024-04-17 19:02:39 +00:00
committed by qsm-odoo
co-authored by qsm-odoo
parent 3ec555eb38
commit d28774398f
3 changed files with 6 additions and 10 deletions
@@ -331,6 +331,7 @@ $modal-footer-border-width: 0 !default;
// HR Separator
$hr-color: $border-color !default;
$hr-opacity: 1 !default;
// Pagination
+3 -7
View File
@@ -412,13 +412,9 @@ hr {
// Safari 16.5 is known to crash when using that to set the color property.
border-top: $hr-height solid $hr-color;
color: inherit;
// FIXME before the commit that introduced this background-color the color
// of HR was the superposition of:
// - background-color = currentColor = see below
// - color = $hr-color = transparent mix of currentColor
// => So a transparent version of the inherited color, on top of itself
// => This line makes it so this stays the same for now.
background-color: $hr-color;
// Bootstrap sets up a "background-color" on the hr tag. As we may use a
// transparent color as $hr-color, we do not want that.
background-color: transparent;
}
h2 {
@@ -9,9 +9,8 @@
border: 0;
border-top: 1px solid $border-color;
margin: 0;
// As BS5 added "opacity" and "background-color" on hr tag, we remove
// that here to let users set the color as they want.
// Bootstrap sets a configurable "opacity" on hr tag, we remove that
// here to let users set the color as they want.
opacity: 1;
background-color: transparent;
}
}