Skip to content

Commit

Permalink
fix(text): removes always computing text element alignment
Browse files Browse the repository at this point in the history
  • Loading branch information
wkashdan committed Mar 26, 2024
1 parent c30f147 commit 7eae43e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/components/Text/src/Text.vue
Original file line number Diff line number Diff line change
Expand Up @@ -232,9 +232,8 @@ export default {
return;
}
const computedStyle = window.getComputedStyle(this.$el);
const textAlign = computedStyle.getPropertyValue('text-align');
this.isCenteredAndSpaced = textAlign === 'center';
// this does not account for inheritted centered text
this.isCenteredAndSpaced = this.textAlign === 'center';
},
},
Expand Down

0 comments on commit 7eae43e

Please sign in to comment.