News for hackers. Stuff that matters.
Re:Why I Write CSS in JavaScript by osrec on Monday February 18, 2019 @09:47AM (#19190917)
I know this will be unpopular, but after a certain point, noscript users just get a bad experience and that can't be helped. If a developer wants to provide a rich experience, then there will always be certain platform requirements. Without them, you will have a lacklustre experience. It's like saying "I want to have all the whizzy functionality of your app, but I want to access it using a standard, run of the mill, mud-laden potato" - it's just not going to be possible.
Re:Why I Write CSS in JavaScript by madeofpalk on Monday February 18, 2019 @10:11AM (#19191161)
noscript users certainly signed up for a subpar internet experience, but its not just them that should be thought about.

Slow internet connections are a reason to think about the experience when loading JS is slow and/or failed. It's not just 'poor people' who have slow internet - 'rich people' on inflight wifi or on the internet on the train can result in things not loading.

Re:Why I Write CSS in JavaScript by osrec on Monday February 18, 2019 @10:23AM (#19191260)
There isn't much that can make an in-flight connection seem quick, but we've tried with our PWA (https://usebx.com/app) and to a certain extent, succeeded.

Ok, we do assume that you have visited our webpage at least once in an area of strong signal, however, once you've done that, all the JS is cached and all we transmit back and forth are lightweight, gzipped json payloads, often less than a kilobyte.

I use my own PWA regularly, and found it actually quite usable in-flight.

Re:Why I Write CSS in JavaScript by thedaemon on Monday February 18, 2019 @10:19AM (#19191233)
I think this is a big issue with such JavaScript and load heavy web-sites & apps. They forget that they have users without 1GB connections and who can't afford, weather financially or location based, the download the 500MBs of data required to load their web-site. That and hiding CSS inside of JS feels like a sneaky tactic to keep people from editing it? Or does it actually create the CSS on the fly? I wasn't quite sure after reading the article.
Re:Why I Write CSS in JavaScript by ringaroll on Monday February 18, 2019 @10:36AM (#19191378)
No regular JS only website/app required 500mb of data. Please stop exaggerating. It does not make your point valid.
Re:Why I Write CSS in JavaScript by dictum on Monday February 18, 2019 @10:05AM (#19191097)
I know how the sausage is made, so I know that making a full web app work without JS isn't at reach for most teams/products.

By knowing how the sausage is made, I'm also aware that the line marking the aforementioned certain point is often drawn too early, at informational (i.e. document) stuff where HTML and CSS are fully capable on their own.

Re:Why I Write CSS in JavaScript by osrec on Monday February 18, 2019 @10:17AM (#19191219)
You underestimate developers; they can make it work without JS if they have to. But why should we constrain ourselves?! I mean, there is nothing wrong with JS when used properly.

In fact, JS is extremely useful in the browser. It adds to the richness and interactivity of webpages. We must collectively appreciate this, and stop denying this! Even HN is a better experience with JS.

Some sites do give JS a bad name, and poorly used JS is something I hate too, but JS as a concept is something that I wholeheartedly support. Thankfully, the web is mostly opt-in - if you don't like the way a site employs technology, just don't visit it. Simple.