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
parent 5e02d71588
commit 003e23520d
No known key found for this signature in database
GPG Key ID: FE03C3A163FEDE68
1 changed files with 5 additions and 2 deletions

View File

@ -1541,12 +1541,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