by ivanb on 9/4/21, 7:37 PM with 50 comments
by Brajeshwar on 9/5/21, 8:10 AM
This is not a stand-alone framework or anything of that type. Treat as one of your scaffold components for your styling framework. Tailwind does this with their tailwind.config.js and is more of raw CSS design tokens. I just wish their commercial TailWindUI[1] make it easy to make use of it the better way.
I wish I saw Pollen a few months ago. I wanted to do an effortless design for my personal website and stick to as plain vanilla CSS as possible. The best way was to rely on CSS-Variables. I did do it from scratch[2]. It works though it is pretty hacky, and I'm not too concerned. Right now, I can swap few values and have an entirely different color scheme - light/dark version of my own, Nord Theme[3], and I will keep adding me whenever I get bored. I can even tweak the rhythms and spacing to my liking with just the variable. You should check out the demo[4] or look at the source[5] (wip).
For those who find this interesting, you should check out another interesting one I discovered a few months back -- css-media-vars[6].
2. https://github.com/oinam/oinam-jekyll/blob/main/_includes/cs...
4. https://oinam.github.io/oinam-jekyll/
by stevage on 9/4/21, 10:54 PM
I mostly use Tachyons, which is definitely a bit outdated. Where does Pollen sit, and what value is it providing? Would love to see some more concrete examples.
by swlkr on 9/4/21, 11:10 PM
by edoceo on 9/4/21, 9:07 PM
by ivanb on 9/4/21, 7:37 PM
by b215826 on 9/4/21, 8:58 PM
by jjdeveloper on 9/4/21, 11:21 PM
by PaulHoule on 9/5/21, 1:34 PM
It’s good because it ‘does no harm’, it doesn’t distort the CSS classes you use on your HTML. It doesn’t make you a slave to a grid.
OTOH, how much does it really do?
If you are writing ‘var(—-color-blue)’ instead of ‘blue’ that is no revolution; sure it lets you sub in another shade of blue, but it would also let you sub in a shade of red for blue.
What I like CSS vars the most for are calc and for setting them w/ JavaScript. There are many gfx situations where a little math is the easy way to solve it, while pure css is confusing and brittle. (You ‘got lucky’ and it is possible to get the behavior you want without calc; change some little thing and you break it.)
by aloisdg on 9/5/21, 8:28 AM
by spankalee on 9/4/21, 8:48 PM
It will work very well with shadow DOM too. Import at the document and all shadow roots get the variable definitions, then you can override them per subtree anywhere in the document.
by Mikeb85 on 9/5/21, 6:54 AM
by krono on 9/4/21, 10:39 PM
by 65 on 9/5/21, 3:01 AM
I'd really just rather write $color-blue rather than var(--color-blue);
by FractalHQ on 9/6/21, 7:36 AM
margin: 1rem @sm 2px
How can I do this? Is there an SCSS plugin or am I going to have to learn how to make my own CSS preprocessor?
by justblender on 9/5/21, 12:41 AM
by clownpepe on 9/4/21, 10:32 PM
by keb_ on 9/5/21, 12:08 AM
by chipotle_coyote on 9/5/21, 6:02 AM
https://docs.racket-lang.org/pollen/
While I don't know how well known Pollen is, it's been featured on Hacker News more than once, IIRC.
I can believe it's just odd coincidence that two projects focused on tools for making it easier to make web sites look better share the same somewhat unusual name, but it's still a little eyebrow-raising.