Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
tipiirai
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
23 ms
·
361.
▲
by
tipiirai
3y ago
Bear in mind that the Tailwind example is the official template made by the Tailwind developers themselves. It is the prime example of Tailwind and it's benefits and best practises. (Should be at least)
362.
▲
by
tipiirai
3y ago
The article is not about "thinking semantics". It's about making leaner and faster websites, and writing less code to achieve the same thing.
363.
▲
by
tipiirai
3y ago
So `<div class="gallery">` is loose coupling, because the styling is not coupled directly into the element. You can completely switch the gallery design, by switching (or overriding, or modifying) the external stylesheet.
364.
▲
by
tipiirai
3y ago
Not all developers have experienced these problems. There are people who prefer the semantic approach. I'm definitely one.
365.
▲
by
tipiirai
3y ago
Author here: I'm sure there are a lot of corner cases since I did not test with all the browsers. My main focus was on writing, and explaining the differences between the two approaches. When/if Nue provides official templates the
366.
▲
by
tipiirai
3y ago
Seems legit. I personally use a mix of semantic class names and utility class names. But without Tailwind.
367.
▲
by
tipiirai
3y ago
Glad to hear this! I'm updating the create-nue project next. It will clarify a lot of things. CSS pre-processor is the next project to be published. I don't want to give ETA, because I'll likely disappoint.
368.
▲
by
tipiirai
3y ago
Author here. You are right: HTML and CSS are always coupled. The major difference is that Tailwind embraces tight coupling and semantic CSS embraces loose coupling. Please check the "Best practises" section: https://nue
369.
▲
by
tipiirai
3y ago
1. Only tested with a handful of browsers and devices 2. I did not optimize the Tailwind version. The Tailwind developers did. 3. I have no idea. I only did the semantic version. It was quick, because I have done so much CSS in my life 4. Y
370.
▲
by
tipiirai
3y ago
> that first example is so grotesque It's the actual HTML code in the sites that are compared
371.
▲
by
tipiirai
3y ago
Certainly not black and white. The article merely states that you need less HTML/CSS code to do the same thing and the resulting site is leaner and faster.
372.
▲
by
tipiirai
3y ago
Author here. Not that it matters, but I have certainly used Tailwind. I even reverse engineered the Spotlight code to semantic CSS. Fully aware of the ins and outs of the TW ecosystem.
373.
▲
by
tipiirai
3y ago
Sorry, which data- attributes? And what do you mean about the semantic DOM structure?
374.
▲
by
tipiirai
3y ago
Indeed. This is a matter of taste. I personally find semantic CSS much clearer. I move faster with it because I need less code to achieve the same thing, and the resulting site is leaner.
375.
▲
by
tipiirai
3y ago
Extra divs are wrappers that help you style the parent element to add flex layouts for example. Or why do you think the official Tailwind template has so many nested divs with utility classes?
376.
▲
by
tipiirai
3y ago
Fixed. Thanks!
377.
▲
by
tipiirai
3y ago
Makes perfect sense. Prototypes are all about doing something very fast and all hacks allowed. Cleanup later.
378.
▲
by
tipiirai
3y ago
Author here. I implemented the commercial Tailwind "Spotlight" template with Semantic CSS and compared the differences in weight, amount of HTML and CSS, rendering speed, and best practices. I was surprised to find _that_ much ove
379.
▲
Tailwind vs. Semantic CSS
(nuejs.org)
124 points
by
tipiirai
3y ago
|
204 comments
380.
▲
by
tipiirai
3y ago
Outch. What services comes to your mind?
381.
▲
by
tipiirai
3y ago
The parent was looking for evidence for why someone could write tests easier with dynamic languages. A long waiting time for type checking to finish came to my mind first. I think hello world is a valid example when talking about unit tests
382.
▲
by
tipiirai
3y ago
Someone here commented that it takes 2.39s for tsc to check types for `console.log('Hello, world!')` [1] (esbuild does not check types). [1]: https://news.ycombinator.com/item?id=37765713
383.
▲
by
tipiirai
3y ago
I think the social pressure relates to people forcing _you_ to use a language that you wouldn't personally go with. Pretty sure the pressure is highest with TypeScript currently.
384.
▲
by
tipiirai
3y ago
> I believe static typing is better Like most of us here it seems. But do you prefer TypeScript over JavaScript? What is your belief / feeling?
385.
▲
by
tipiirai
3y ago
I was asking you to take a little distance from the TS-world and use your experience (and maybe emphaty) to look about the pros of JS. Preferrably a list that pleases the TS community. The fact that JS is an "universal language"
386.
▲
by
tipiirai
3y ago
Indeed. It's rare to see real-world scenarios where thousands of items are mass-manipulated on the client side. They exist, but rarely. The lists are typically appended/prepended or individual items are updated.
387.
▲
by
tipiirai
3y ago
Note that Nue will probably work just fine for your use case. The list is not re-rendered when individual items on the list are updated or when new items are added. Currently only re-rendered when the whole list is sorted or replaced with a
388.
▲
by
tipiirai
3y ago
Thank you lucideer! Great, kind points. Made me feel better.
389.
▲
by
tipiirai
3y ago
Nice! Definitely my own necessity. Unfortunately no large showcases, because the toolset is not ready yet.
390.
▲
by
tipiirai
3y ago
Every framework? Which comes to your mind first?
More ›