4 ms·
CSS Curiosities of the Past
- meerita 22d agoI was having a peaceful day until these CSS curiosities brought back memories of my painful days. It's really good that we don't need to deal with such hacks and vendor-specific things anymore. The last time I participated in a project that targeted an old browser was in 2018!
- robin_reala 22d agoOut of interest, how do you define “old”?
- meerita 22d agoMostly Internet Explorer 7 and 8, some Mozilla Firefox builds. That’s what I had in mind when I said “old browsers.” The last project I worked on that still had to support browsers from that era was in 2018.
- robin_reala 22d agoSounds about right. Looking back I’d already moved IE7 to “functional” support in late 2016[1] and was planning to do the same to 8 and 9 in the not too distant future. [1] https://technology.blog.gov.uk/2016/10/21/gaining-understanding-of-the-browsers-people-use/ https://technology.blog.gov.uk/2016/10/21/gaining-understand...
- nottorp 22d ago> we don't need to deal with such hacks and vendor-specific things anymore Unfortunately that means everyone targets chrome. Then you end up with shit performance or broken sites in Firefox [1]. You'd think with "AI" they could generate js/css that works in both browsers... [1] Which is the only browser that can still run proper ublock origin... Edit: someone pointed below that the compatibility problem's magnitude is much smaller. Seems flagged and dead for unknown reasons. The magnitude is probably much smaller, but that makes it worse, because people will just forget about FF.
- meerita 22d agoThat is not quite the same problem. Modern browsers are vastly more standards-compliant than they were in the IE era, and most CSS/JS works across Chrome, Firefox and Safari without browser-specific hacks. There was a time when we routinely did browser sniffing, maintained IE-specific code paths, used vendor prefixes everywhere, and sometimes shipped completely different fixes depending on the browser. That largely disappeared as browsers converged on standards. Chrome-first development can still cause bugs elsewhere, but that's usually a "testing/implementation problem" rather than the same compatibility mess we had back then.
- mitxela 21d agoThat's because they just wrote down what Chrome did and called it a standard.
- bryanrasmussen 22d agoThe magnitude might be greater in specific sub areas, for example if you are doing chrome first, how is your accessibility on Safari? I don't know myself, but I think there are holes people don't notice with this approach. Also I agree the thing about Meerita's post being flagged and dead seems wrong. There is evidently nothing wrong with the post and it should not be.
- carlosjobim 22d agoIt's easy nowadays to make websites that function perfectly and look beautiful on all devices, browsers, and systems from 10 years ago until today. If somebody cannot deliver that, they should be fired from their job.
- nottorp 22d ago> If somebody cannot deliver that, they should be fired from their job. ... i haven't been able to download my invoices off the Orange Romania site for months in Firefox. They work perfectly in Chrome. Somehow I bet the ones that fucked up the functionality got a raise instead of being fired.
- vladde 22d agofunny how almost all of these are just related to Internet Explorer haha
- layer8 22d agoIt was the most important browser from roughly 1999 to 2012.
- elenbaray 22d ago[flagged]
- elenbaray 22d ago[flagged]
- ryanschaefer 22d agoIf anything is worthy of the title “load-bearing” it’s IE… I wonder how many collective years of developers’ lifespans were dedicated just to addressing its quirks.
- mike_tyson 22d agoit was frustrating but i preferred it to dealing with stuff like node, tooling, mobile and tablet views, that stuff really burned me out in a way that IE 6 never did.
- VCFundedGenYer 22d agoWhen I took web design courses they basically told us you effectively have to make two websites - one for IE6, and one for all the other browsers. It came down to a bunch of crazy hacks and conditionals you had to bake in.
- Sharlin 22d agoI remember when in a past life we were allowed to bump the minimum supported IE version of our SPA framework from 6 to 8. It was a joyful day – but we soon realized that it didn’t really buy us that much because 8 was almost as quirky…
- 1-more 22d agoIt's not just that it had quirks, it's that your feedback loop was longer in IE compared to Firefox with Firebug and Chrome. IE 7 did not, to my recollection, have a way to open developer tools and tweak CSS values until it looked right, or even to see what the effective CSS on an element was. So you had to save and refresh. Sure, that's not a super long cycle time compared to, say, compiling a binary and flashing to a ROM, but it's longer than the other browsers I was working with at the time.
- stephenhuey 22d agoI wonder how many trillions in GDP we missed out on due to them building a monopoly in the browser space and then abandoning it. You can't imagine how happy I was in 2005 when Microsoft announced they were resuming development on IE. I was already a fan of Firefox by that point, but a lot of web dev was such a drag because you couldn't just use modern browser features--you had to accommodate all the users still browsing with that dinosaur. Here's an archive of their momentous blog post: https://forums.anandtech.com/threads/ie-update-to-debut-ahead-of-plans.1528349/#post-14577012 https://forums.anandtech.com/threads/ie-update-to-debut-ahea... They shipped a beta later that year, but the full release arrived in late 2006. That was 4 years since their prior release, an eternity in those days!
- mike_tyson 22d agomiss those days. i was seen as a genius at work for understanding quirks mode and how JScript differed from javascript/ecmascript
- gfat 22d agoIt felt like wizardry tbh
- robin_reala 21d agoI was described by a slightly mad client as “the Harry Potter of front-end development” after I’d pulled off a particular effect my designer had come up with. (They then proceeded to give the entire dev team Harrods hampers and failed to pay the company when we sent an invoice.)
- Cyykratahk 22d agoThe really funky part of the IE6 PNG fix was that the URL of the image in the expression was always relative to the current page URL, not the CSS file that the declaration was in. I remember having to use Javascript to generate the image path (I cannot quite remember why absolute or root-relative URLs were not an option for us though...)
- robin_reala 22d agoI built a mildly responsive site in 2007 using transparent PNGs overlaying a photo in the header, only for it to turn out that the client’s IT policy blocked the PNG loader. In the end I had to explain to them that everyone else would see the site normally, and they’d have to put up with it until IE7 launched.
- sbarre 22d agoSurprised there was no mention of the old system theme colours (that I think still work in some browsers but are long-deprecated): https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Values/system-color#deprecated_system_color_keywords https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/V... I used these CSS styles in the late 90s to make internal browser-based apps for our call centre agents that looked & felt more like native Windows desktop apps.
- robin_reala 22d agoThey’re still there for use in forced colors mode. I blogged about this a bit at https://medium.com/flat-pack-tech/ikea-windows-high-contrast-mode-38e4666acbe4 https://medium.com/flat-pack-tech/ikea-windows-high-contrast...
- gaigalas 22d agoThey exist but don't actually grab system colors (to prevent pages spoofing the system look). --- Shameless plug: In neutrino (my webview wrapper), we grab those and inject them as prefixed CSS variables (--neutrino-NameOfSystemColor). Works on windows/macos/gtk/qt, and except for qt it works live (if the user changes the accent tone, the CSS variable updates automatically). https://alganet.dev/neutrino/ https://alganet.dev/neutrino/ Screenshot of Mint: https://imgur.com/a/WyjpwsR https://imgur.com/a/WyjpwsR
- sbarre 21d agoThat's an interesting point about preventing the spoofing of system prompts and windows.. These were very handy in simpler times but I definitely see why we don't want them around these days.
- gaigalas 21d agoYeah, "Your anti-virus is outdated, click here to update" popups mimicking the OS were a real issue. That's also why many browsers also don't allow popups without an URL bar now. For some time, Internet Explorer even had chromeless popups (no OS decorations, title bar or anything). Absolutely nasty, you could draw anything.
- gaigalas 22d agoMissing the whole IE quirks mode vs standards mode thing, but nice. Some of those hacks were specifically for IE, and there was a debate on staying quirks vs going standards mode. Each had its own drawbacks and choices.
- saltypixel 22d ago[flagged]
- VCFundedGenYer 22d agoI last heavily worked with CSS in 2010/2011. These still don't feel old to me. There came a point where if you wrote good HTML/CSS that passed the W3C validator, you were golden on pretty much any device. This still rings true today.
- 6031769 22d agoAnd that point was when the public sector finally abandoned IE6. It has all been peachy since then.
- robin_reala 22d agoWhen working in the public sector in 2016 I had a person seriously annoyed with me for dropping IE6 support when all their libraries (as in buildings with books) were still on it.
- reaperducer 21d agoHealthcare industry here. I couldn't drop IE6 until COVID. Lots of doctors offices and others were still running it. But when the virus slashed our staff, we finally got permission to drop the extra work of supporting IE.
- devhunt-org 22d agoWhich of these old CSS tricks do you actually miss?
- moritzwarhier 22d agoBoth not tricks, and I can't say I miss them, because I didn't work as web dev at the time. I only witnessed the trailing part of the pain, when I started, there were mostly flexbox-related browser inconsistencies. Anyway: cursor: hand !indispensable; seems vastly superior to cursor: pointer !important; And I once came across the CSS "script expressions" out of web history curiosity. Dangerous but appealing idea. Seems like every web dev (well, those working on server-rendered markup and without AI, at least) would feel a desire for this at some point, but it was doomed at the time. In some ways, reminds me of Houdini regarding the CSS->JS coupling (the other direction is already normal, sure). But the intent behind it was probably just to allow maximum flexibility... well div.title { background-color: expression( (new Date()).getHours()%2 ? "#B8D4FF" : "#F08A00" ); } does look quite funny :) I'd love to hear more from people who actually used this.
- perilunar 21d agoNone of them — they were all ugly hacks, and we wasted stupid amounts of time and brainpower testing sites and then researching and applying the hacks. I still hate Microsoft for 'winning' the browser war and then letting IE stagnate for so many years. So much time and money wasted because of their behaviour. Arseholes.
- tosti 22d ago> Internet Explorer had a number of iffy behaviours and lagged behind other browsers for many visual effects, even regarding basic properties like opacity. Thus, Microsoft brought in bespoke filter functionality. That's not accurate at all. At the time IE4 launched, it was ahead of the competition. It also had quite a lot of non-standard extras as part of Microsofts strategy to embrace, extend and extinguish. IE4 was extend. In other cases the strategy worked, but not for the web. The DirectX filters weren't used pretty much anywhere until it turned out it could do things that were specced and implemented by others years later.
- agos 22d agobut that is not about IE4
- tosti 22d agoI see. Although filters were implemented in IE4, DirectX filters came about in IE5.5 However, the extend phase wasn't just IE4. They stopped piling on all sorts of non-standard vendor lock-in stuff after IE6. By the time IE7 came out, it was clear the web is here to stay.
- duskwuff 22d ago> They stopped piling on all sorts of non-standard vendor lock-in stuff after IE6. IE6 also stuck around a lot longer than previous versions. It was released in 2001; IE7 didn't show up until 2006, and was an optional update which many users skipped.
- icedchai 21d agoMany forget that IE was basically the only decent browser for most of the early 2000's. It was the defacto standard. Netscape 4.x was ancient and crashed every half hour. Mozilla/Firefox wasn't stable yet. Chrome wasn't out.
- 21d ago
- QuadrupleA 22d agoIE was such a scourge, a drain on humanity (at least the slice of humanity that made websites). One of Microsoft's great evils - they let the product stagnate for years once they had the market cornered. Windows has kinda become that now, a low quality user-hostile product forced on people through inertia and monopoly tactics.
- deleted 22d ago[deleted]
- zetanor 22d agoBesides vendor tricks, I'd like to see a showcase or article about the evolution of page layout patterns over time. That is, the underlying techniques, not the aesthetics; tables, fixed image sizes, float/clear, flex, etc. I'm finding https://code-literacy.medium.com/css-layout-evolution-detailed-by-example-579b31475392 https://code-literacy.medium.com/css-layout-evolution-detail... but it's quite skeletal and incomplete. Has anyone here come across a more complete write-up?
- maxglute 22d agoI miss gaudy scrollbars.
- mitxela 21d agoI miss scrollbars.
- tiborsaas 22d agoRemember rounded corners? It was a real pain, there were so many hacks to achieve something simple as border-radius: 16px; My other favorite was sIFR font loading :) Because font support was... patchy, a technique was invented to replace headers with Flash embeds which rendered the desired font: https://www.webdesignmuseum.org/web-design-history/sifr-2004 https://www.webdesignmuseum.org/web-design-history/sifr-2004
- robin_reala 22d agoI was so glad to replace SIFR with Cufon: http://cufon.shoqolate.com/generate/ http://cufon.shoqolate.com/generate/
- tiborsaas 22d agoAh, thanks, I knew there was another one :)
- ramses0 22d agoNine-Boxes, aka: https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/border-image-slice https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/P... ...and that was a grand improvement over having to make a "tic-tac-toe" table where you'd be putting things in the particular surrounding cells to fake these fancy border-types.
- somat 22d agoA skit Boss enters, enthusiastic hand gestures dev: Web 2.0? what the hell are you on about? Boss: evasive mumbling dev: Oh... css border-radius Sure, I will get right on it.
- yomismoaqui 22d agoThe single best things about AI coding is not having to write CSS again.
- trgn 22d agoI have made so many users happy with !important
- Brajeshwar 22d agoI’ve build many a widgets that got embedded on other websites other than the source. So, yes, it was `!important` that always saved the day.
- CM30 21d agoThe funny thing about old IE versions is that they did in fact get one thing right in retrospect; the box model used was a lot more intuitive than the one used by 'default' in standards compliant browsers. Why would border and padding be outside the main element's width? That doesn't match how anyone thinks of a box... Either way, the end result was that everyone started using box-sizing: border-box when it was added, and now even the folks at the W3C regret the old box sizing model being used at all. Surprised how many of these I didn't remember though. Filters, yes. Syntax hacks to trick IE into using one CSS value while compliant browsers used another, sure. But I don't think I ever came across 'HTML Components' before reading this article.
- mitxela 21d agoThe Chrome monoculture is just as bad as the previous IE6 monoculture. Back when we had several browsers, all different, that was optimal anti-enshittification.