4 ms·
my favorite ie css hack was \IEversion e.g. width: 100%\9; would only apply width: 100% to IE9. it showed that even microsoft devs hated how css became a p
by tylerchilds 2y ago
my favorite ie css hack was
\IEversion
e.g.
width: 100%\9;
would only apply width: 100% to IE9.
it showed that even microsoft devs hated how css became a pissing match and needed a system to workaround their own mess.
i do not miss css hacks to support ie, but this approach to hacking ie was the best out of the lot
- skobes 2y agoWe had a production outage one day because we had accumulated more than four thousand CSS selectors and IE8 could not handle that many.
- tylerchilds 2y ago4,096 iirc, and i also was one to arbitrarily split files lol
- shakna 2y agoI think I got hit by that being not exactly 4096. Some elements would grab a selector handle, then disappear, but take the handle with them. It's been too long, and my memory is too crap, to be sure. But I think I sat there growling cursewords for a few days until I worked that one out.
- ericwood 2y agoWe accidentally discovered the max number of assets circa 2011 in a very large Rails app in development mode (which loaded CSS/JS files individually without concatenation). I forgot what it was but it was much lower than you'd anticipate.
- aidos 2y agoA lifetime of dirty browser hacks is suddenly flooding back. Kids these days will never appreciate what we had to go through to make a page render anywhere near consistently in different browsers. Tricks like crafting css that only some browsers could parse. height/**/: 300px; Or the insane sliding doors technique we used to get rounded corners. https://alistapart.com/article/slidingdoors/ https://alistapart.com/article/slidingdoors/ The mystery script we included to get alpha support in images. https://git.twinhelix.com/cgit/iepngfix/tree/iepngfix.htc https://git.twinhelix.com/cgit/iepngfix/tree/iepngfix.htc The fact that select inputs were rendered by the OS so you had to find them all and hide them when you opened a modal so they didn’t sit on top of your content. The desire to support custom files that drive us into swapping all the text for blocks of Flash after the page loaded. It was almost better than the 20 level deep nested table layouts full of shims we had to do.
- kccqzy 2y agoThe most memorable hack was the voice-family hack for IE 5.5 IIRC. I remember reading about it and how the hack was so nice as to reset the voice-family afterwards. To date I still don't think voice-family is really supported anywhere; really shows how optimistic CSS was at that time.
- alganet 2y agoExactly! There is a whole taxonomy of hacks. Syntax hacks (star hack), CSS hacks (clearfix), quirks mode doctypes. A few years before that, we had single pixel GIF transparent spacers to manage table cells in layout, and more atrocious hacks. This was a dark age.
- mrj 2y agoAnd the second browsers supported rounded corners, they went out of style :-(
- robin_reala 2y agoYou didn’t have to hide selects, you just (just, hah!) had to dynamically generate an empty iframe and shim it one z-level below your absolutely positioned div.
- alganet 2y agoI... don't think this \9 is intentional! If I remember correctly, any attribute value would mess up IE < 9. At this time, I was favoring using conditional comments to deliver tweaked simplified CSSs for the IEs. They were not only buggy, they were slow, so for a while it made some sense.
- chrismorgan 2y agoThere were two things, \0 (escaped null) and \9 (which I think was could be any other escape sequence, but that 9 was customarily used). I don't remember the difference in browsers they'd target, the information will still be out there somewhere, I'm sure, though you'll have to sift through dead links.