Hacker News new | ask | show | jobs
by Induane 1832 days ago
I test mostly on Firefox and Epiphany; I figure if it works there it's going to work just about everywhere.

Safari is a different beast because I don't have a Mac and it's support for a lot of standards is pretty dismal. It's like the IE6 of browsers these days.

I keep the JS simple though and for CSS I keep around a few handy LESS functions so I can get some basic stuff on crap browsers. Stuff like:

.opacity(@default, @percent) { -webkit-opacity: @default; -khtml-opacity: @default; -moz-opacity: @default; -ms-opacity: @default; -o-opacity: @default; opacity: @default; // ms-filter *SHOULD* work on IE8 & 9 but ... doesn't always // for me? WTF... anyway (filter should also work). This // should be listed before filter to be safe -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=@percent)"; filter: alpha(opacity=@percent); /* support: IE8 oh god we're all gonna die*/ }

or

.box-shadow(@value) { -webkit-box-shadow: @value; -khtml-box-shadow: @value; -moz-box-shadow: @value; -ms-box-shadow: @value; -o-box-shadow: @value; box-shadow: @value; }

This way I don't rely on some framework like Bootstrap, and I can write fairly simple stylesheets. I used to transpile compliant and legacy sheets and serve different urls depending on user agent strings but that didn't work well and was generally crap so - one it is.

Don't worry, when I transpile I strip my unprofessional comments.