diff options
| author | Christophe Simonis <chs@odoo.com> | 2019-09-20 17:33:22 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2019-09-20 17:34:45 +0200 |
| commit | 64e43808b79badb5869a8d73cc1cc3f3b3aa8e12 (patch) | |
| tree | 9a22d5f6c03073a4d10faedea8df23a5211e8b8f /addons/web/static/src/scss/ui.scss | |
| parent | 944891ced081cda3b8b3db5faf3b7ac23b6b4ce8 (diff) | |
| parent | 58a83d12228fbbd4e9dde542e133d264204ee0f3 (diff) | |
[MERGE] forward port branch saas-12.5 up to 58a83d12228
Diffstat (limited to 'addons/web/static/src/scss/ui.scss')
| -rw-r--r-- | addons/web/static/src/scss/ui.scss | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/addons/web/static/src/scss/ui.scss b/addons/web/static/src/scss/ui.scss index 9ab1729a4ac..5a46c9c01a8 100644 --- a/addons/web/static/src/scss/ui.scss +++ b/addons/web/static/src/scss/ui.scss @@ -91,3 +91,41 @@ span.o_force_ltr { /*rtl:ignore*/ direction: ltr; } + +// To fill the available space while keeping aspect ratio (crop). +// Assuming the important part of the image is its center. +.o_object_fit_cover { + object-fit: cover; +} + +.o_image_24_cover { + width: 24px; + height: 24px; + object-fit: cover; +} + +.o_image_40_cover { + width: 40px; + height: 40px; + object-fit: cover; +} + +.o_image_64_cover { + width: 64px; + height: 64px; + object-fit: cover; +} + +// Keep ratio but avoid cropping (so part of the background becomes visible). +.o_image_64_contain { + width: 64px; + height: 64px; + object-fit: contain; +} + +// When having a square is not necessary, the image will take less space if any +// of its width or height is smaller than 64px. +.o_image_64_max { + max-width: 64px; + max-height: 64px; +} |
