News for hackers. Stuff that matters.
Re:InstaCSS: the CSS docs you always wish you had by sedev on Monday November 14, 2011 @10:03AM (#3234197)
Oh look, it's another site that loads nothing with JavaScript off. What is wrong with you? Progressively enhance, or gracefully degrade, or display something other than a completely blank page to non-JavaScript visitors. I harbor many doubts re: your competence in the realm of usability.
Re:InstaCSS: the CSS docs you always wish you had by endtwist on Monday November 14, 2011 @10:17AM (#3234268)
The percentage of users with Javascript disabled[1] is smaller than the percentage of users using Opera[2].

So there is nothing wrong with choosing to not support 2 out of every 100 users; that's simply a time/cost assessment. What's wrong with you?

[1] http://developer.yahoo.com/blogs/ydn/posts/2010/10/how-many-...

[2] http://www.w3schools.com/browsers/browsers_stats.asp

Re:InstaCSS: the CSS docs you always wish you had by btucker on Monday November 14, 2011 @10:23AM (#3234294)
Which is all well and good unless users don't have a choice. http://en.wikipedia.org/wiki/Comparison_of_screen_readers
Re:InstaCSS: the CSS docs you always wish you had by endtwist on Monday November 14, 2011 @10:26AM (#3234305)
Re:InstaCSS: the CSS docs you always wish you had by ricardobeat on Monday November 14, 2011 @12:22PM (#3234787)
Except that most sites don't care about providing decent clues (correct mark-up, ARIA attributes, etc) for javascript interactions, so that's also a poor argument.
Re:InstaCSS: the CSS docs you always wish you had by jgroome on Monday November 14, 2011 @11:02AM (#3234457)
How many web developers looking up CSS reference material are using screen readers though?

It's OK to develop for your target audience, right?

Re:InstaCSS: the CSS docs you always wish you had by sedev on Monday November 14, 2011 @05:12PM (#3235925)
I admit I'm atypical here, but I do all my development work in emacs, and it's nice to have reference material that can also be accessed through emacs.
Re:InstaCSS: the CSS docs you always wish you had by ricardobeat on Monday November 14, 2011 @12:20PM (#3234778)
There is something wrong - in many countries you are mandated by law to make your site accessible :)

Of course this doesn't apply here, but I wanted to be dramatic. Should be piece of cake to just show the full content if javascript is off, since it is already loading all of it.

Re:InstaCSS: the CSS docs you always wish you had by slig on Monday November 14, 2011 @06:31PM (#3236183)
I can't reply to your last comment, so I'm going to to it here:

> The point is that it's trivial to make a site like this usable without JS, with little effort. You just have to start with the right mindset.

How are you supposed to make a instant search usable without JS?

If it doesn't need to be instant, just normal search with a nice GET /search?q=border, one would have to program a server side script to do that search.

Or maybe you'd just want to show the whole reference on the HTML, then the JS would have to use that to do the search and hide/show the appropriate div, or you'd have to load everything twice (once in the HTML body and again via ajax). Even then, what's the point? It's a instant search. If the user can't use the only feature of it, he's better off googling.

Is there other way that I'm missing? I don't see that as "trivial".

Re:InstaCSS: the CSS docs you always wish you had by ricardobeat on Monday November 14, 2011 @09:31PM (#3236706)
If you read the other parts of the thread, or check the source code, you'll see that the whole content is loaded at once. There are no further requests. It's all already there with `display:none`.

    document.getElementsByTagName('html')[0].className += ' js'

    .js #search-results { display:none; }
That's basically all you need.
Re:InstaCSS: the CSS docs you always wish you had by JoshTriplett on Monday November 14, 2011 @05:08PM (#3235910)
Screen readers support Javascript-enabled browsers these days.
Re:InstaCSS: the CSS docs you always wish you had by ricardobeat on Monday November 14, 2011 @06:08PM (#3236131)
Accessibility is not just about screen-readers. There are hundreds of mobile browsers, consoles and a myriad of other devices with zero to broken javascript support. And even in screen-readers that do support JS, most interactions are broken unless you use proper mark-up and manage page focus and keyboard shortcuts.

The point is that it's trivial to make a site like this usable without JS, with little effort. You just have to start with the right mindset.

Re:InstaCSS: the CSS docs you always wish you had by JoshTriplett on Monday November 14, 2011 @10:24PM (#3236864)
> There are hundreds of mobile browsers, consoles and a myriad of other devices with zero to broken javascript support.

These days, both of the major mobile browsers use WebKit and have great JavaScript support, though they may not support bleeding-edge browser functionality quite yet (for which all non-demo sites definitely need fallbacks). The unofficial mobile browsers have great JavaScript too. Consoles have decent browsers with decent JavaScript, and in any case not all sites need to expect console browsers as a remotely common case.

You have to draw the line somewhere, and not all sites need to support Lynx, Links, or Mosaic. I certainly agree that having decent fallbacks for a site like this doesn't require that much effort, but not all functionality supports graceful degradation.

These days, browsing without JavaScript seems less likely to indicate an older browser, and more likely to indicate a user with JavaScript intentionally disabled using something like NoScript. That user may get righteously offended that a document would dare to run code on their system, but that doesn't necessarily make them right.

All web features tend to follow a three-step lifecycle: too new to use at all except for demos, stable enough to use with fallbacks for older browsers, universal enough to use without fallbacks. Depending on your site and your target audience, basic JavaScript may fall in the second or the third category.

Re:InstaCSS: the CSS docs you always wish you had by ricardobeat on Monday November 14, 2011 @11:52PM (#3237078)
You don't have to draw a line anywhere in cases like this. The technology is there that makes it perfectly possible to have at least basic text display on any client. The "major" mobile browsers with webkit represent only 20-30% of the global market.

Anyway, it's just a couple of extra lines of code, get over it :)

Re:InstaCSS: the CSS docs you always wish you had by JoshTriplett on Tuesday November 15, 2011 @01:41AM (#3237303)
Again, that works just fine in cases like this. Though note that the solutions for this site require either server-side scripting or just completely disabling the search functionality.

However, many sites use more advanced JavaScript features which do not necessarily allow for graceful degradation.

(Also, most other mobile browsers of the type you allude to consist of barely more than WAP; only the simplest of non-interactive websites has any hope of working with them. And many sites simply won't have any of those users in their target audience.)

Re:InstaCSS: the CSS docs you always wish you had by slammdunc23 on Monday November 14, 2011 @10:48AM (#3234391)
The creator of this website, rgarcia, specifically said (when he posted it a couple of days ago) that it was a 24-hour project: http://news.ycombinator.com/item?id=3222253

Cut him some slack! I harbor many doubts re: your competence in the realm of friendliness.

Re:InstaCSS: the CSS docs you always wish you had by sedev on Monday November 14, 2011 @05:01PM (#3235892)
That is a relevant piece of information I hadn't known. Thank you.
Re:InstaCSS: the CSS docs you always wish you had by jgroome on Monday November 14, 2011 @10:16AM (#3234263)
> What is wrong with you?

There's got a be a more polite way to phrase that.

Also, while I understand the reasons for disabling JavaScript generally, is this really something to get that upset about?

Re:InstaCSS: the CSS docs you always wish you had by sedev on Monday November 14, 2011 @05:08PM (#3235908)
"Doesn't function right without JavaScript" disabled rates a shrug - JS enables lots of cool stuff. "Displays a completely blank page without JavaScript" is - well, in this case, as others have pointed out, one of the tradeoffs made in pursuit of a 24-hour project. However, in a mature site (I'm looking at certain MSDN blogs), it's very disturbing, it's a big warning flag for "lack of attention to detail."

My reactions to broken-without-JS sites spring from security, privacy, usability, and accessibility concerns. "Sites that completely break without JS" is a category that strongly correlates with "sites that have major issues in at least one of those four categories."

Re:InstaCSS: the CSS docs you always wish you had by slig on Monday November 14, 2011 @10:32AM (#3234327)
Yeah, how the OP dares to shows us a prototype of something that he probably hacked in a couple of hours and doesn't even support the very specific user that has JS disabled by default.
Re:InstaCSS: the CSS docs you always wish you had by retube on Monday November 14, 2011 @10:06AM (#3234212)
Don't even get a blank page :) Get a "Server not found"
Re:InstaCSS: the CSS docs you always wish you had by lightyrs on Monday November 14, 2011 @02:03PM (#3235197)
I wish I could downvote this.
Re:InstaCSS: the CSS docs you always wish you had by tkrajcar on Monday November 14, 2011 @10:11PM (#3236836)
sigh