News for hackers. Stuff that matters.
Re:Pollen – A library of CSS variables inspired by TailwindCSS by jjdeveloper on Saturday September 04, 2021 @07:21PM (#28420297)
Tailwind gives you inline media queries and the confidence that your css doesn’t impact other elements on your site. Also you don’t need to think up class names. CSS variables are great, I just don’t really understand the value, I guess it gives you a bit of constraints for consistent styling.
Re:Pollen – A library of CSS variables inspired by TailwindCSS by spankalee on Saturday September 04, 2021 @08:06PM (#28420582)
Tailwind doesn't let you use selectors and co-locate style definitions. It's effectively shorthand for inline styles.

Pollen lets you use nicely defined values like Tailwind, but use CSS as designed to assemble them into sets.

Re:Pollen – A library of CSS variables inspired by TailwindCSS by weird-eye-issue on Saturday September 04, 2021 @11:52PM (#28421497)
You can do the same with Tailwind by using @extend
Re:Pollen – A library of CSS variables inspired by TailwindCSS by Tomte on Sunday September 05, 2021 @02:42AM (#28422082)
If you use the whole node-based toolchain. This looks fantastic, because I don't need any of that.
Re:Pollen – A library of CSS variables inspired by TailwindCSS by weird-eye-issue on Sunday September 05, 2021 @04:49AM (#28422586)
Yeah but for most production apps it's just one extra thing to add to Webpack so isn't really an issue
Re:Pollen – A library of CSS variables inspired by TailwindCSS by spankalee on Sunday September 05, 2021 @02:55AM (#28422124)
@extend isn't CSS though
Re:Pollen – A library of CSS variables inspired by TailwindCSS by di4na on Sunday September 05, 2021 @03:19AM (#28422208)
That could be solved if someone took it to shepherd it through the process.

And honestly we need it.

Re:Pollen – A library of CSS variables inspired by TailwindCSS by rahimnathwani on Saturday September 04, 2021 @09:40PM (#28421004)
With tailwind, it's sort of assumed that you're using e.g. React components. So all buttons will look the same because you'll import the button component, that's defined in a separate style.

Pollen seems to me closer to bootstrap: define classes for each thing, and then use them everywhere.

If you're designing a page or site without breaking your HTML into separate components, I can see the point of Pollen.

(I am not a front-end expert, and my opinion is based on my limited experience using bootstrap, tailwind and tailwindui+react.)

Re:Pollen – A library of CSS variables inspired by TailwindCSS by scns on Sunday September 05, 2021 @01:24AM (#28421839)
Tailwind is in not coupled to React, Adam Wathan its' creator used Laravel when he made it.
Re:Pollen – A library of CSS variables inspired by TailwindCSS by rahimnathwani on Sunday September 05, 2021 @01:39AM (#28421887)
If you're going to use Tailwind with Laravel, you're going to break your pages up into Blade Components to keep things consistent, right?
Re:Pollen – A library of CSS variables inspired by TailwindCSS by scns on Monday September 06, 2021 @02:36AM (#28431059)
Yep, but they are called templates in backend frameworks, You write HTML with sprinkled in logic in Elixir/PHP/Python/Ruby etc.

Components is the terminus used in (usually) JavaScript frontend development where you write JS logic and HTML is only used in the render/view/etc function.

Re:Pollen – A library of CSS variables inspired by TailwindCSS by rahimnathwani on Monday September 06, 2021 @02:49AM (#28431120)
Even backend frameworks distinguish between templates and components.

For example, Laravel has Blade templates and Blade components. From the documentation on the latter:

"Components and slots provide similar benefits to sections, layouts, and includes"

If you use Tailwind with Blade templates, but don't use {components, sections, layouts, includes}, then you'll have a hard time keeping things consistent. Because you'll define how a button looks over and over in each template. In that case, something like Bootstrap or Pollen would be easier.

But the right way is probably to break your templates into smaller pieces (e.g. components) so you can use Tailwind but still share things like buttons between templates.

Re:Pollen – A library of CSS variables inspired by TailwindCSS by scns on Monday September 06, 2021 @04:04AM (#28431521)
Ah i see, thanks for the clarification, not using Laravel myself.