Comment on What are your thoughts on Skeleton(Svelte)?
snowe@programming.dev 1 year ago
Could someone explain tailwind and skeleton for me? I’ve heard of tailwind but haven’t ever looked into it
Comment on What are your thoughts on Skeleton(Svelte)?
snowe@programming.dev 1 year ago
Could someone explain tailwind and skeleton for me? I’ve heard of tailwind but haven’t ever looked into it
Hexarei@programming.dev 1 year ago
Tailwind is an unrelated project, that’s just used by this one.
Basically, TailwindCSS is a combination of two things:
prefers-color-scheme
set to dark, etc.The main benefits, I find, are mostly:
text-green-500
and you suddenly have green text with a middle-of-the-road luminosity. Need spacing? Use one of the padding or margin utilities, and you’ll have consistent spacing based on a convention.py-4
and you know you get “level 4” padding without having to care what the exact pixel amount is. But! You know it’s the same as everywhere else you’ve donepy-4
. No need to go fiddle with a stylesheet.Tailwind focuses on coupling your styling to your HTML by using tiny, focused, glanceable utility classes (
<div></div>
) rather than by needing to create a ton of potentially-confusing “semantic” classes^[1]^ (<div></div>
).There are tons of classes in it, and I’ve found it to be super useful. Want to center something, horizontally and vertically? Here’s how in Tailwind:
And if you need a one-off specific setup - something like
display: grid; grid-template-columns: 30px 1fr 1fr 20px
, you can do it with the JIT as such: `snowe@programming.dev 1 year ago
Thanks for the explanation. Looks like there was a lemmy issue with that classes but I think I get it.
ahto@feddit.de 1 year ago
FYI lemmy ate all the classes on your divs.
Hexarei@programming.dev 1 year ago
RIP