From 71cb7f6b555528207497d72e06b79edd49cc6c3c Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Wed, 26 Jan 2022 18:35:36 +0100 Subject: [PATCH] inspector: adaptive color picker size --- src/client/ui/ui-sidepanel.js | 1 + src/scss/ui/inspector.scss | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/client/ui/ui-sidepanel.js b/src/client/ui/ui-sidepanel.js index d588566c..3aad01e5 100644 --- a/src/client/ui/ui-sidepanel.js +++ b/src/client/ui/ui-sidepanel.js @@ -107,6 +107,7 @@ class UiSidePanel extends UiWidget { updateWidth() { this.container.style[this.vertical ? 'height' : 'width'] = this.width + 'rem' + this.container.style.setProperty('--sidepanel-size', this.width + 'rem') } diff --git a/src/scss/ui/inspector.scss b/src/scss/ui/inspector.scss index 34489d98..c4ee0c3d 100644 --- a/src/scss/ui/inspector.scss +++ b/src/scss/ui/inspector.scss @@ -602,7 +602,9 @@ osc-inspector-color { .color-picker { position: absolute; z-index: 99; - height: 180rem; + height: calc(var(--sidepanel-size) - #{$label-width} - #{$field-height * 2}); + min-height: 111rem; + max-height: 227rem; top: 0; right: 22rem; left: $label-width;