Skip to content
Snippets Groups Projects
Commit 5881c13a authored by HJ's avatar HJ :fire:
Browse files

computed color display support in color_input

parent fa2fcc88
No related branches found
No related tags found
2 merge requests!1074Update master with 2.0.0,!1037Themes v3 Part 1 "2.1" codenamed "One step for themes, a giant burder for code reviewers"
......@@ -31,11 +31,14 @@
height: 100%;
}
}
.computedIndicator,
.transparentIndicator {
flex: 0 0 2em;
min-width: 2em;
align-self: center;
height: 100%;
}
.transparentIndicator {
// forgot to install counter-strike source, ooops
background-color: #FF00FF;
position: relative;
......
......@@ -38,6 +38,11 @@
v-if="transparentColor"
class="transparentIndicator"
/>
<div
v-if="computedColor"
class="computedIndicator"
:style="{backgroundColor: fallback}"
/>
</div>
</div>
</template>
......@@ -95,6 +100,9 @@ export default {
},
transparentColor () {
return this.value === 'transparent'
},
computedColor () {
return this.value && this.value.startsWith('--')
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment