Skip to content

Commit

Permalink
Merge pull request #3925 from nextcloud/fix/3877/inherit-theme-from-body
Browse files Browse the repository at this point in the history
Fix styles inheritance in `NcAvatar` when being mounted
  • Loading branch information
nickvergessen authored Mar 24, 2023
2 parents 35e2fc9 + db0c767 commit 1f5a81c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/NcAvatar/NcAvatar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,7 @@ export default {
* @return {string}
*/
avatarUrlGenerator(user, size) {
const darkTheme = window.getComputedStyle(this.$el)
const darkTheme = window.getComputedStyle(document.body)
.getPropertyValue('--background-invert-if-dark') === 'invert(100%)'
let url = '/avatar/{user}/{size}' + (darkTheme ? '/dark' : '')
if (this.isGuest) {
Expand Down

0 comments on commit 1f5a81c

Please sign in to comment.