Skip to content

Commit

Permalink
Merge pull request #5597 from nextcloud-libraries/fix/icon-size
Browse files Browse the repository at this point in the history
fix(NcIconSvgWrapper): Fix icon size variable being undefined
  • Loading branch information
susnux authored May 16, 2024
2 parents b7fe0a7 + 08e92b0 commit 215f0fc
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/components/NcIconSvgWrapper/NcIconSvgWrapper.vue
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,9 @@ export default {
attributes() {
return {
class: ['icon-vue', { 'icon-vue--inline': this.inline }],
style: {
' --icon-size': this.iconSize,
},
role: 'img',
'aria-hidden': !this.name ? true : undefined,
'aria-label': this.name || undefined,
Expand Down Expand Up @@ -233,10 +236,10 @@ export default {

&:deep(svg) {
fill: currentColor;
width: v-bind('iconSize');
height: v-bind('iconSize');
max-width: v-bind('iconSize');
max-height: v-bind('iconSize');
width: var(--icon-size, 20px);
height: var(--icon-size, 20px);
max-width: var(--icon-size, 20px);
max-height: var(--icon-size, 20px);
}
}
</style>

0 comments on commit 215f0fc

Please sign in to comment.