collateral fixes, removed alpha control for alerts, added contrast text

generation for alerts, updated getTextColor to also have fallback to black/white
if resulting contrast isn't passable (only when inverting lightness!), updated
UI to use tabs.
This commit is contained in:
Henry Jameson 2018-11-14 19:39:17 +03:00
parent 1723f427f5
commit e7fe2dc9f9
11 changed files with 200 additions and 187 deletions

View file

@ -1,5 +1,5 @@
<template>
<span class="contrast-ratio">
<span v-if="contrast" class="contrast-ratio">
<span :title="`Contrast is ${contrast.text}`" class="rating">
<span v-if="contrast.aaa">
<i class="icon-thumbs-up-alt"/>
@ -11,7 +11,7 @@
<i class="icon-attention"/>
</span>
</span>
<span class="rating" v-if="large" :title="`Contrast is ${contrast.text} (18pt+)`">
<span class="rating" v-if="contrast && large" :title="`Contrast is ${contrast.text} (18pt+)`">
<span v-if="contrast.aaa">
<i class="icon-thumbs-up-alt"/>
</span>