6 ms·
CSS becoming an unreadable mess with so much special-syntax for properties. The cognitive load is just too much. HN folks make fun of tailwind (even I am guilty
by lenkite 2y ago
CSS becoming an unreadable mess with so much special-syntax for properties. The cognitive load is just too much. HN folks make fun of tailwind (even I am guilty), but the hard fact remains that Tailwind simplifies and dumbs-down stuff for the mortal programmer. I personally find reading complex C++ Template Metaprogramming easier to follow than sophisticated CSS.
.card {
border-radius: 1rem;
max-width: 36ch;
padding: 2rem;
background: radial-gradient(
300px circle at 55% 60% in oklab,
var(--shine-2), transparent 100% 100%
), radial-gradient(
farthest-side circle at 75% 30% in oklab,
var(--shine-1) 0%, var(--card-bg) 100%
);
background-blend-mode: color-burn;
animation: animate-color-1 8s infinite linear alternate, 4s animate-color-2 1s infinite linear alternate;
}
- KTibow 2y agoI personally find that code rather readable for code specifically designed to show that it isn't readable. (I don't think the background attribute is valid syntax though, color spaces should be specified per color and the percents are redundant)
- lenkite 2y agoWell, hats off to your memory and intellect. If you take a poll and see how many people remember or comprehend the special-case syntax sugar for the dozens of distinct CSS properties - which gets more and more complicated yearly with every CSS enhancement, I believe you will be in the super-minority. CSS has already become one of the most complex languages in the world. Wish there was an attempt to simplify and unify syntax as opposed to just adding more and more features.
- xigoi 2y agoIf for some reason you need such a complex gradient, how would Tailwind make it any easier to write?