Merge pull request #16543 from nextcloud/backport/16532/stable16
[stable16] Fix max contrast retrieval to limit minimum color for relative time
This commit is contained in:
commit
159ff6dd97
|
@ -1542,13 +1542,16 @@
|
||||||
|
|
||||||
try {
|
try {
|
||||||
var maxContrastHex = window.getComputedStyle(document.documentElement)
|
var maxContrastHex = window.getComputedStyle(document.documentElement)
|
||||||
.getPropertyValue('--color-text-maxcontrast')
|
.getPropertyValue('--color-text-maxcontrast').trim()
|
||||||
|
if (maxContrastHex.length < 4) {
|
||||||
|
throw Error();
|
||||||
|
}
|
||||||
var maxContrast = parseInt(maxContrastHex.substring(1, 3), 16)
|
var maxContrast = parseInt(maxContrastHex.substring(1, 3), 16)
|
||||||
} catch(error) {
|
} catch(error) {
|
||||||
var maxContrast = OCA.Accessibility
|
var maxContrast = OCA.Accessibility
|
||||||
&& OCA.Accessibility.theme === 'themedark'
|
&& OCA.Accessibility.theme === 'themedark'
|
||||||
? '130'
|
? 130
|
||||||
: '118'
|
: 118
|
||||||
}
|
}
|
||||||
|
|
||||||
// size column
|
// size column
|
||||||
|
|
Loading…
Reference in New Issue