Cozzbie Cozzbie - 10 days ago 8
CSS Question

CSS Class declaration in square brackets

So I have seen this CSS class in a lib

[text-uppercase] {
text-transform: uppercase;
}


and I am not sure on how to use it in a
div


<div class="text-uppercase | [text-uppercase]"></div>


I have tried both. Not working.

I am seeing this in a ionic2.

Answer

For the selector to work:
<div text-uppercase></div>

[text-uppercase] selector matches an attribute on a tag.

More on CSS selectors on SO Documentation