News for hackers. Stuff that matters.
Re:Why Tailwind CSS Won by xigoi on Wednesday August 16, 2023 @06:39AM (#37145114)
4/5/6 what? Bananas? And what exactly is “screen size”? Does it refer to physical size, or number of pixels? Does it count width, height, or both?
Re:Why Tailwind CSS Won by conradfr on Wednesday August 16, 2023 @07:02AM (#37145261)
These refers to customizable variables and breakpoints that everyone using the library and having done css would know and you can probably click on your IDE to get to their definition.

Personally I think that's way better than putting padding & margin in your own css classes.

It actually cuts down a lot on the custom css you need to write and also helps having a uniform design.

Re:Why Tailwind CSS Won by deprecative on Wednesday August 16, 2023 @07:31AM (#37145474)
You're just using someone else's padding and margin classes. At least when you write your own it makes sense instead of Tailwind's alphabet soup bloat.
Re:Why Tailwind CSS Won by ajanuary on Wednesday August 16, 2023 @08:12AM (#37145833)
Not really. Tailwind lets you configure your own spacing and breakpoints. You get to pick what those numbers mean.
Re:Why Tailwind CSS Won by deprecative on Wednesday August 16, 2023 @05:45PM (#37154311)
That's just a CSS variable. You don't need Tailwind for that.
Re:Why Tailwind CSS Won by ajanuary on Thursday August 17, 2023 @05:57AM (#37159417)
Never said you did. I was just explaining that you aren't "using someone else's padding and margin classes".
Re:Why Tailwind CSS Won by cantSpellSober on Thursday August 17, 2023 @09:09AM (#37160995)
They are CJS modules or (ideally) Typescript. CSS custom properties (variables) are slightly different.

    import type { Config } from 'tailwindcss'
    
    export default {
      content: [],
      theme: {
        extend: {},
      },
      plugins: [],
    } satisfies Config
(not arguing for or against TW here)
Re:Why Tailwind CSS Won by dalmo3 on Wednesday August 16, 2023 @08:52AM (#37146302)
You don't need 5 question marks to tell us you don't know what breakpoints are.
Re:Why Tailwind CSS Won by xigoi on Wednesday August 16, 2023 @09:10AM (#37146522)
I know what breakpoints are. As far as I'm aware, there are no standard values for them.
Re:Why Tailwind CSS Won by arrowsmith on Thursday August 17, 2023 @06:13AM (#37159518)
Here, here are Tailwind's standard breakpoints:

      'sm': '640px',
      // => @media (min-width: 640px) { ... }

      'md': '768px',
      // => @media (min-width: 768px) { ... }

      'lg': '1024px',
      // => @media (min-width: 1024px) { ... }

      'xl': '1280px',
      // => @media (min-width: 1280px) { ... }

      '2xl': '1536px',
      // => @media (min-width: 1536px) { ... }
That's from the docs. https://tailwindcss.com/docs/screens

If you don't want those specific breakpoints in your project, you can override the defaults in `tailwind.config.js`.