I am working on creating a dynamic screen using AngularJS
.
Within this screen, there are objects with a specific size:
.item
{
margin: auto;
margin-bottom: 10px;
width: 11vw;
height: 11vw;
text-overflow: ellipsis;
overflow: hidden;
}
These items are inserted through an ng-repeat loop based on the data returned from an API
.
<div class="item"
ng-click="ctrl.clickFunction()"
ng-style="{'background-color':ctrl.color }">
<div class="itemGlobalCode">{{::ctrl.name}}</div>
</div>
The issue I am facing is that the items are round and for better visualization, I want to adjust the font size of the content (in this case ctrl.name) if it exceeds the container size.
I have explored some jQuery
solutions but ideally, I would prefer to find a pure CSS
solution. Do you have any suggestions?