una/YouMightNotNeedJS

CodePen requires JavaScript

Opened this issue · 6 comments

When I click on examples (such as "See the Pen CSS Only Accordion: youmightnotneedjs.com " I get a big red bordered error message "CodePen requires JavaScript to render the code and preview areas in this view."

This seems rather contrary to the purpose of the demonstration :-(

Of course I totally agree with the purpose of the site, since of course I use NoScript to avoid running random untrusted code from random untrusted sources.

But it's not contrary to the purpose of the demonstration.

The purpose is to show examples where (S)CSS can replace javascript. Not to build an online text editor without javascript.

If, however, you find an online text editor that doesn't require javascript, open a PR!

una commented

If you'd like to make all of these examples native, that would be awesome. I used codepen as a quick demo tool that's interactive and effective

I was thinking about doing a progressive enhancement version; ie: display native demo in a noscript tag and displaying the codepen when JS is available. Although I'm not sure if it's all that effective since you loose all the ability to interact with the code directly and are then left with two demos to update (I'm willing to bet one of them will fall out of date).

una commented

I think thats a good alternative-- wouldn't be too difficult to do a native demo (just copying over code really). The architecture/setup would be the biggest challenge

I think that is indeed pretty much what I was aiming at. I wasn't expecting an editor or editable demo without javascript enabled, but I was hoping to see the thing that was described in action.

Alright I'll send a pr this weekend for the progressive enhancement version unless someone else beats me to it.