Trigger fallback code to get max contrast value and use integer there

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
This commit is contained in:
Morris Jobke 2019-07-25 09:45:09 +02:00 committed by Backportbot
parent 861daee4d8
commit 6ee98f3567
1 changed files with 5 additions and 2 deletions

View File

@ -1543,12 +1543,15 @@
try {
var maxContrastHex = window.getComputedStyle(document.documentElement)
.getPropertyValue('--color-text-maxcontrast').trim()
if (maxContrastHex.length < 4) {
throw Error();
}
var maxContrast = parseInt(maxContrastHex.substring(1, 3), 16)
} catch(error) {
var maxContrast = OCA.Accessibility
&& OCA.Accessibility.theme === 'themedark'
? '130'
: '118'
? 130
: 118
}
// size column