inspector: display transparent colors & ensure color picker is always visible
This commit is contained in:
parent
5ef59b16aa
commit
49fae0b677
2 changed files with 3 additions and 2 deletions
|
|
@ -95,10 +95,10 @@ class UiInspectorField extends UiWidget {
|
|||
|
||||
let style = window.getComputedStyle(this.widget.container),
|
||||
colorData = this.widget.constructor.cssVariables.find(x=>x.js === this.name),
|
||||
val = '#000'
|
||||
val = 'transparent'
|
||||
|
||||
try {
|
||||
val = chroma(style.getPropertyValue(colorData.css).trim()).hex('rgb')
|
||||
val = chroma(style.getPropertyValue(colorData.css).trim()).hex('rgba')
|
||||
} catch(e) {}
|
||||
|
||||
let picker = html`<osc-inspector-color type="text" name="${this.name}" value="${val}" style="--color-picker-value: ${val}"></osc-inspector-color>`
|
||||
|
|
|
|||
|
|
@ -258,6 +258,7 @@ osc-inspector-color {
|
|||
@include pseudo-fill();
|
||||
&:after {
|
||||
border-radius: 2rem;
|
||||
border: 1rem solid var(--color-ui-button)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue