5 ms·
"In an SPA/component world, where assets like scripts and styles are loaded asynchronously, you can’t guarantee style sheet loading order, which means you have
by weego 8y ago
"In an SPA/component world, where assets like scripts and styles are loaded asynchronously, you can’t guarantee style sheet loading order, which means you have to lean on some form of runtime composition to guarantee a shape, else you end up with !important rules even if you follow a given architecture"
I'm sorry, this guy is so far down the rabbit hole he can't even see the ridiculousness of his mental gymnastics.
- whyonearth 8y agoThe thread makes me want to quit the industry. One person disagrees and gets "I vote for this statement to be nominated for Worst Sentiment of 2018", while the gist-er is congratulated with "instant classic" and "you're my hero." The JS cargo-culting insanity is becoming unbearable and dissenters are mocked as noobs.
- ryanmccullagh 8y agoIn my 2 years of experience, this guy does not represent "the industry".
- icholy 8y agoJust get off the front end. Things are pretty sane everywhere else.
- oftenwrong 8y agoI stopped doing front-end dev for this reason. I told my manager I no longer wanted to do anything on the front-end, and they were fine with that. Since I've gone 100% back-end only, my work life has been far more sane.
- deleted 8y ago[deleted]
- rjplatte 8y agoAgree. I'm trying to right now. I think it has more artsy types, which means more drama.
- strken 8y agoI think it's because SPA web development is like using a hammer made of chewing gum to build a house, and the ridiculous toolchains necessary to build a solid hammer always look complicated and unnecessary. EDIT: What I mean here is that the foundations of the web weren't designed for application development and are missing some crucial bits and pieces like encapsulation. The tooling necessary to encapsulate CSS in a way that works with every browser is complicated, and if you've only worked on small to medium projects it can be hard to see the need for such complication.
- vcarl 8y agoThat "worst sentiment of 2018" comment was directed specifically at > Things like that (CSS into JS/ typed JS/Elm) are done because the developers are not competent enough in their field, and instead of learning about it, they try to create their own solution for it Broadly calling developers incompetent because they've developed/use tools that you don't like is not "disagreement," it's just an ad-hominem. It has no place in a technical discussion.
- purple_ducks 8y agoMy favourite from that thread is somebody trying to be smart & pithy leaving a link to the wiki page on 'Composition over inheritance' When the OP replies that he can do that in CSS or Sass, smart guy then moves on to new argument - naming. Reading interactions between 2 people with different well reasoned opinions on the same issue is fantastic and can be illuminating. Reading curt regurgitation from people who don't have anything worthwhile to add to the convo is beyond frustrating.
- 33degrees 8y agoGiven that one of the benefits of these approaches is that styles are scoped to components, i don’t see how load order can be a concern
- Spivak 8y agoBecause two stylesheets base.css and mytweaks.css might not load in the order you want even if all the rules are scoped? And at that point you're already using something like webpack to enforce the order you want, why not just make JS do it?
- deleted 8y ago[deleted]
- 33degrees 8y agoI consider the goal of scoping styles is to not require overriding styles, in which case the order shouldn't matter... perhaps that's not practical in all cases but it's worked for me so far.
- Geee 8y agoLong answers to simple things is a sign that there's something wrong. Reminds me of this piece of history (how to set focus on input field in AngularJS): https://stackoverflow.com/questions/14833326/how-to-set-focus-on-input-field https://stackoverflow.com/questions/14833326/how-to-set-focu...
- deleted 8y ago[deleted]
- symboltoproc 8y agoI'm curious what frontend problems you have solved to be able to know that this is ridiculous and have to start a personal assault against the author of this comment?
- danabramov 8y agoIs there really no way to have a technical discussion without being hostile? You could, for example, reply with the actual things you disagree with. You think you're being the "sane one" here but it's comments like this that turn every discussion about a polarizing topic into an equivalent of a bar fight. Get your stuff together.
- tboyd47 8y agoHow would you have phrased GP's point to make it more acceptable?
- danabramov 8y agoIf you remove the ad hominem from it, there is no point left at all. I could find another phrasing if it contained any substance.
- dang 8y agoPersonal attacks will get you banned here. Please review https://news.ycombinator.com/newsguidelines.html https://news.ycombinator.com/newsguidelines.html and don't post like this to HN again. We've had to ask you this more than once before.