Today, I came across an intriguing observation. While browsing through code, I noticed that text was being transformed to uppercase using CSS instead of the common JavaScript method toUpperCase()
. Surprisingly, this approach caused a test to fail. The test was designed to check if the text was being rendered correctly, but due to the CSS-driven text transformation, there was a discrepancy between the displayed text and the actual data.
So, the question arises - is it considered poor practice to change text case in CSS under specific circumstances?