[FIX] web, portal: re-introduce w-0 and h-0 utility classes
When updating bootstrap to bootstrap 5 with [1], the h-0 and w-0 extended utility classes were lost. This commit adds them back, using the Utility API of Bootstrap described here [2], and the $utilities-sizes from [3]. Therefore, the code introduced in [4] is not needed anymore (those classes are now available in all Odoo instead of just the frontend). This commit fixes the footer "scroll to top" option of the website builder. [1]: https://github.com/odoo/odoo/commit/971e5a91aab9 [2]: https://getbootstrap.com/docs/5.0/utilities/api/ [3]: https://github.com/odoo/odoo/commit/e377a084174d [4]: https://github.com/odoo/odoo/commit/da55072a6935 closes odoo/odoo#101691 X-original-commit: 3a2ad02962fdea254ca46af1f7728b537a6af9cd Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
This commit is contained in:
@@ -36,7 +36,6 @@ a dependency towards website editing and customization capabilities.""",
|
||||
'portal/static/src/views/**/*',
|
||||
],
|
||||
'web.assets_frontend': [
|
||||
'portal/static/src/scss/bootstrap.extend.scss',
|
||||
'portal/static/src/scss/portal.scss',
|
||||
'portal/static/src/js/portal.js',
|
||||
'portal/static/src/js/portal_chatter.js',
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
@each $breakpoint in map-keys($grid-breakpoints) {
|
||||
@include media-breakpoint-up($breakpoint) {
|
||||
$infix: breakpoint-infix($breakpoint, $grid-breakpoints);
|
||||
|
||||
@if $infix != '' { // Standard ones are already created by bootstrap
|
||||
@each $prop, $abbrev in (width: w, height: h) {
|
||||
@each $size, $length in $sizes {
|
||||
.#{$abbrev}#{$infix}-#{$size} { #{$prop}: $length !important; }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -12,12 +12,6 @@ $gray-900: #212529 !default;
|
||||
|
||||
$gray-300: #dee2e6 !default;
|
||||
|
||||
// This variable affects the `.h-*` and `.w-*` classes.
|
||||
$sizes: () !default;
|
||||
$sizes: map-merge((
|
||||
0: 0,
|
||||
), $sizes);
|
||||
|
||||
// Body
|
||||
//
|
||||
// Settings for the `<body>` element.
|
||||
|
||||
@@ -98,12 +98,14 @@ $utilities: map-merge(
|
||||
map-get($utilities, "width"),
|
||||
(
|
||||
responsive: true,
|
||||
values: $utilities-sizes,
|
||||
),
|
||||
),
|
||||
"height": map-merge(
|
||||
map-get($utilities, "height"),
|
||||
(
|
||||
responsive: true,
|
||||
values: $utilities-sizes,
|
||||
),
|
||||
),
|
||||
"max-width": map-merge(
|
||||
|
||||
Reference in New Issue
Block a user