I was posting on a phpBB site and was using some basic formatting code
to emphasize certain words. I, being the 1337 haxX0r that I am, knew
that encasing those words in [b] or [i] in that environ would convert
it to <b> or <i> in HTML. Here's where the title comes in: NOPE! It
freaking creates spans with a CSS style statement for the appropriate
style... instead of using 7 fucking characters (opening and closing
tags) to do the exact same thing.
<SPAN STYLE="font-weight: bold"></SPAN>
39 chars
<b></b>
7 chars
<SPAN STYLE="font-style: italic"></SPAN>
40 chars
<i></i>
7 chars
And if you use bold + italic, it's a whopping 79 characters compared
to 14. phpBB isn't smart enough to combine the styles in a single span
tag.
So my discovery of this was precipitated by not seeing the text
displayed as it should be by Lynx. Obviously bold is less common for
TTY screens and I've never seen italic on console, so Lynx allows you
to recolor different types of styles. It works great, except that, for
good reason, Lynx doesn't parse through CSS. It's pointless for Lynx
to try to render CSS. So none of the styling is pushed through. It's
not a huge deal, but it's kind of annoying.
Now I know that many people don't use text browsers nowadays... or
browsers that don't support CSS. I get it. I do. But why, for the love
of God, would you CHANGE what has been working for years and years for
something less efficient and bulkier? I wouldn't have even been mad if
they had used <em> or <strong>, but a 39-char span? What fucking
browser doesn't understand <b>? Why would you change that? "Yeah, I
was just going to drive a normal sedan like a Corolla to work, but
honestly I'd prefer to drive myself in a school bus. What do you mean
'that makes no sense'?"
You'd think people working with a language as established as PHP
wouldn't shun efficient, sensible code. But they did. PHP puts enough
strain on a server as is, and now you're just making markup take up
5-10x the bytes it needs to? What were they thinking?!