Earlier quoted context omitted.
What problems on mobile (small screens) do you see? > no drawbacks Would it be slower or use more CPU or memory to render?
Are we really worried about the CPU/memory impact of flexbox vs HTML tables?
There's never been a better time to build websites
291–300 of 337 posts
Re: There's never been a better time to build websites
#292Earlier quoted context omitted.
> The thing is you can still do all of this. But we have since built tools and frameworks to let you still do this, while giving you superpowers. I think Svelte is the best example of this. You can create a dead simple site with it and have the result you are talking about I don't know. I just tried to use Netlify to upload a simple static Html/Javascript page I made. Now I'm trying to figure out CORS errors. Pretty…
If you're trying to figure out CORS errors, it means you're either loading fonts or making XMLHttpRequests across domains. Neither of those were available in the 90s era OP is rhapsodizing about. You don't have to use the additional features/complexity of the past 15–20 years… but if you do , it's not surprising that things get a little more complex!
Re: There's never been a better time to build websites
#293The real success story we should be celebrating is how awesome the specs are in modern web browsers. Vanilla JS, CSS, and even HTML itself have gotten incredibly good. Just having Flexbox and Grid working as native CSS layout engines is tremendous, and soon we'll have container queries (!!). The latest ES versions are lightyears ahead of the JavaScript of yesteryear. HTML now has superpowers when you consider what custom elements/web components are capable of. Developments at the level of HTTP itself, along with in-browser imports, are affording new opportunities to leverage the browser directly to handle dependency graphs rather than requiring everyone to bundle/transpile everything all the time for all seasons.
I wish the article had gone much more into those exciting, web-spec developments—rather than tout an unproven and controversial JS framework (Remix) and a somewhat-proven yet still-controversial CSS framework.
Re: There's never been a better time to build websites
#294Earlier quoted context omitted.
And if you try it on mobile, it's mostly crap. Let's not treat HTML tables as being some super special ability. If HN were implemented exactly the same but with flexbox or grid for layout, it would be objectively better with no drawbacks I can think of.
(Semi) honest question to the commenters below parent, do you all use styluses, or do you just have small fingers, or is there some predictive touch system in the default browser for your devices that isn't present in Firefox? How big are your screens, are you running phablets? Trying to understand how so many people are reaching the conclusion that HN works well on mobile. Maybe 25% of the time I try to upvote or do…
Re: There's never been a better time to build websites
#29510 years later, I had to do something similar...I think I spent a good day just setting up things, before writing a line of code. And then a couple of weeks for the rest, learning by doing.
I don't know - websites today are much more complex...in fact, I'd say that most such websites are basically web apps, which have replaced the native software we wrote 10-15-20 years ago. But I didn't end up with a good feeling after I was done.
Re: There's never been a better time to build websites
#296Earlier quoted context omitted.
And if you try it on mobile, it's mostly crap. Let's not treat HTML tables as being some super special ability. If HN were implemented exactly the same but with flexbox or grid for layout, it would be objectively better with no drawbacks I can think of.
What problems on mobile (small screens) do you see? > no drawbacks Would it be slower or use more CPU or memory to render?
With flexbox layout, probably (?), but likely imperceptibly (don't quote me on that, I haven't actually done the math to check if the benefits from decreased DOM elements would outweigh the increased cost of flexbox, maybe it would get faster just by virtue of shipping less HTML).
That being said, GP is being kind of extravagant, there is arguably nothing on HN that requires tables or flexbox. I always felt like inline spans and maybe a few floats/margin:autos for stuff like headers/menus would probably handle the majority of the layout.
This is part of my criticism of "HN picked the simple answer" takes; even if you go back over a decade and even if you take flexbox off the table, tables weren't really the simplest answer after CSS `margin:auto` was invented. This really isn't a website with columns of data, it almost doesn't need any layout tool at all.
I think the, "now flexbox exists so we can do it correctly" takes are also wrong in their own way; HN is a single-column reading experience with very simple menus, why bring flexbox into this? I always try to temper this claim because I haven't technically ever sat down and built a pixel-perfect replica using normal HTML, I don't technically know there's nothing that wouldn't require modern CSS. But I have poked around at different pages of the site and messed around with resolutions, and I've never seen a situation on the site that I felt required all of that extra HTML and complexity.
I almost wonder if the point of the embedded font tags and image spacers and crud is that site is trying to make it sort of render the same even with CSS turned off. But if so, that's bad practice and the site should stop doing that. Anyone who's turning off CSS is doing that for a reason and the site should just respect that and ship them the pure content.
Re: There's never been a better time to build websites
#297Earlier quoted context omitted.
Question: Are people using tailwind for layout? Even when CSS grid is available? If so what is the benefit of tailwind layouts over modern CSS, beyond what tailwinds usually brings?
This question doesn’t really make sense. Tailwind is just modern CSS, it’s just a composable shorthand for applying styles. There’s plenty of CSS grid utilities in Tailwind: https://tailwindcss.com/docs/grid-template-columns
.container {
grid-template:
"nav . header header header" auto
"nav . . . . " 1ex
"nav . main . aside " 1fr
". . . . . " 1em
"footer footer footer footer footer" auto
/ 40ch 1em 1fr 1ex 15ch
}
You could achieve something like this in Tailwind using nested flexboxes, but that is not the same as doing layout in CSS as you have to work with the shortcomings of the framework. Now I’m not saying it is not worth it, but saying it is the same is missing a huge aspect of how we do layout in modern CSS.Re: There's never been a better time to build websites
#298Earlier quoted context omitted.
I would have been horrified if I saw what websites would look like in 2010+ when I first started using the web. The amount of unnecessary garbage and JS added to sites goes well beyond the adtech part. Half or more of sites using frameworks probably should never have used them. A good contrast is Reddit vs hn. Reddit’s current site is basically unusable and sluggish on modern hardware that can you could train ML mode…
Just look at all the overhead of the article‘s website… When I first clicked the link the "website" crashed, so instead of the hot take, all I could read is that "addEventListener is not a function". That tells you all about the current state of affairs (Yes I get that webdevs' personal sites are their playground)
Re: There's never been a better time to build websites
#299Re: There's never been a better time to build websites
#300Earlier quoted context omitted.
My biggest concern is for the people relying on the big platforms you mentioned but not using them to build their own lists and lines of communication with their clients.
I recently heard a podcast by the comedian Kevin Hart. In the early 2000s, when he was an unknown and social media didn't exist, he would have a sign-up sheet at his shows, where people could enter their names and email addresses. This way, he'd maintain an email list for each city. Each time he scheduled a return appearance in that city, he'd send out an email letting people know the date and time of the show and a…
Spam is a huge problem.