Skip to content

Commit 1f5a81c

Browse files
Merge pull request #3925 from nextcloud/fix/3877/inherit-theme-from-body
Fix styles inheritance in `NcAvatar` when being mounted
2 parents 35e2fc9 + db0c767 commit 1f5a81c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/components/NcAvatar/NcAvatar.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,7 @@ export default {
617617
* @return {string}
618618
*/
619619
avatarUrlGenerator(user, size) {
620-
const darkTheme = window.getComputedStyle(this.$el)
620+
const darkTheme = window.getComputedStyle(document.body)
621621
.getPropertyValue('--background-invert-if-dark') === 'invert(100%)'
622622
let url = '/avatar/{user}/{size}' + (darkTheme ? '/dark' : '')
623623
if (this.isGuest) {

0 commit comments

Comments
 (0)