rgb: simpler style
This commit is contained in:
parent
2a36b43e71
commit
f1c6d42b27
2 changed files with 6 additions and 13 deletions
|
|
@ -196,7 +196,7 @@ module.exports = class Rgb extends _pads_base {
|
|||
if (!options.nohue && !options.dragged) {
|
||||
var hue = hsbToRgb({h:this.hsb.h,s:100,b:100})
|
||||
this.hue = `rgb(${Math.round(hue.r)},${Math.round(hue.g)},${Math.round(hue.b)})`
|
||||
this.wrapper[0].setAttribute('style',`background:${this.hue}`)
|
||||
this.wrapper[0].setAttribute('style',`background-color:${this.hue}`)
|
||||
this.faders.h.setValue(this.hsb.h, {sync: false, send:false, dragged:false})
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -75,9 +75,13 @@
|
|||
.rgb-container {
|
||||
.pad {
|
||||
> .wrapper {
|
||||
background: red;
|
||||
margin: 6rem;
|
||||
width: auto;
|
||||
background-color : red;
|
||||
background-clip: content-box;
|
||||
background-image: linear-gradient(to bottom, rgba(0,0,0,0) 0%,rgba(0,0,0,1) 100%), linear-gradient(to right, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 100%);
|
||||
|
||||
image-rendering:pixelated;
|
||||
> canvas {
|
||||
z-index: 1;
|
||||
}
|
||||
|
|
@ -85,17 +89,6 @@
|
|||
--color-knob:transparent;
|
||||
--color-gauge:transparent;
|
||||
}
|
||||
&:before {
|
||||
content:"";
|
||||
position: absolute;
|
||||
left:0;
|
||||
top:0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
&:before {
|
||||
background: linear-gradient(to bottom, rgba(0,0,0,0) 0%,rgba(0,0,0,1) 100%), linear-gradient(to right, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 100%);
|
||||
}
|
||||
}
|
||||
> .hue-wrapper {
|
||||
height: 14rem;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue