computed color display support in color_input
This commit is contained in:
parent
fa2fcc8827
commit
5881c13adc
@ -31,11 +31,14 @@
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.computedIndicator,
|
||||||
.transparentIndicator {
|
.transparentIndicator {
|
||||||
flex: 0 0 2em;
|
flex: 0 0 2em;
|
||||||
min-width: 2em;
|
min-width: 2em;
|
||||||
align-self: center;
|
align-self: center;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
}
|
||||||
|
.transparentIndicator {
|
||||||
// forgot to install counter-strike source, ooops
|
// forgot to install counter-strike source, ooops
|
||||||
background-color: #FF00FF;
|
background-color: #FF00FF;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
@ -38,6 +38,11 @@
|
|||||||
v-if="transparentColor"
|
v-if="transparentColor"
|
||||||
class="transparentIndicator"
|
class="transparentIndicator"
|
||||||
/>
|
/>
|
||||||
|
<div
|
||||||
|
v-if="computedColor"
|
||||||
|
class="computedIndicator"
|
||||||
|
:style="{backgroundColor: fallback}"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -95,6 +100,9 @@ export default {
|
|||||||
},
|
},
|
||||||
transparentColor () {
|
transparentColor () {
|
||||||
return this.value === 'transparent'
|
return this.value === 'transparent'
|
||||||
|
},
|
||||||
|
computedColor () {
|
||||||
|
return this.value && this.value.startsWith('--')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user