У меня есть простая сетка данных с иконками.
<clr-datagrid>
<clr-dg-column>Severity</clr-dg-column>
<clr-dg-row *clrDgItems = "let alert of alerts; let i = index [clrDgItem] = "item">
<clr-dg-cell>
<clr-icon id = "severity-error" shape = "minus-circle" class = "is-solid"></clr-icon>
</clr-dg-cell>
</clr-dg-row>
</clr-datagrid>
Как я могу центрировать значки в ячейках?






Вам нужно добавить стиль в тег ячейки <clr-dg-cell>.
<clr-dg-cell style = "text-align: center;">
<clr-icon id = "severity-error" shape = "minus-circle" class = "is-solid"></clr-icon>
</clr-dg-cell>
Вы можете попробовать это в своем style.css
clr-dg-cell {
text-align: center;
}
ИЛИ ЖЕ
Вы можете использовать встроенный CSS
<clr-dg-cell style = "text-align: center;">
< your content>
</clr-dg-cell>