Octavia (previously) didn't just inherit a C# application with dodgy approaches to string handling. It's also an application with questionable understandings of CSS.

CSS is far from perfect, and offers a lot of pitfalls and traps. There's a reason the "impossibility" of vertically centering text is a punchline. It's so flexibly declarative that, in many cases, there are many ways to achieve the same styling result, and it's difficult to pick out the correct one. But one would hope that developers could at least avoid the obviously terrible ones.

<div class="positioning"><span><div class="positioning"><span><div class="positioning"> <!-- repeats several hundred more times -->My Page Title<!-- then the matching closing tags--> </div></span></div></span></div>

This was not generated HTML, at least as it exists in the codebase. Someone checked this in. Whether they scripted it or copy-pasted remains a mystery. What's less mysterious is the purpose.

Octavia doesn't have the "positioning" class to share, but it sets a number of properties. Only one is relevant here: it adjusts the width of the div by one pixel. The gigantic pile of divs and spans above exists to center the text on the page. Horizontally.

There are a lot of wrong ways to do that in CSS, but this is arguably one of the most wrong.

[Advertisement] Keep the plebs out of prod. Restrict NuGet feed privileges with ProGet. Learn more.