This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-05-09
Channels
- # announcements (23)
- # babashka (7)
- # beginners (69)
- # biff (5)
- # calva (12)
- # cider (10)
- # cljfx (9)
- # clojure (60)
- # clojure-austin (1)
- # clojure-europe (14)
- # clojure-korea (2)
- # clojure-losangeles (2)
- # clojure-madison (1)
- # clojure-nl (1)
- # clojure-norway (23)
- # clojure-uk (7)
- # clojuredesign-podcast (16)
- # clojurescript (40)
- # datomic (8)
- # gratitude (4)
- # mount (3)
- # nrepl (2)
- # off-topic (38)
- # pathom (3)
- # releases (1)
- # ring (8)
- # shadow-cljs (7)
Hey all. I've been looking for a front-end "component" library (maybe more of a CSS library) which meets the following criteria. Since search engines are finished I am not having much luck. • Just pure HTML & CSS - no build step. • Has minimal default styles for typography, input elements, basic layout. • Customizeable with a few CSS vars: colours, borders, font. Any suggestions much appreciated. 🙏 So far I looked at PureCSS, VanillaCSS, and my own minimal-stylesheet. Thanks!
I've seen https://ui.shadcn.com/ being mentioned before. I'm quite wary about it though, because it's not "install and use" but "copy+paste and use".
I think it depends on Tailwind, which I thought implied a build step. Maybe I should take another look. I really love the look of shadcn/ui. 😍
Mm, probably. Although, you can probably use TailwindCSS without having to run any build step if you're fine with shipping classes you don't use.
I can't remember if it has variables or not though
https://github.com/kognise/water.css/blob/master/src/variables-light.css OK it does have some
I like to use tailwind and you can definitely use it without building https://tailwindcss.com/docs/installation/play-cdn . It seems like it's a script import so probably it does the "building" on the fly. 95% of stuff I do in tailwind can be done with a prebuilt stylesheet that has everything, those extra 5% are for adding specific configs (if you need that) or if you want to escape values (like specifying some width in pixels explicitly).
A trick I use to help find things like this when search engines fail is to search "awesome X" where X in this case would be CSS, then just look through the github repos that come up
> 95% of stuff I do in tailwind can be done with a prebuilt stylesheet that has everything @U02S4QZAH61 do you know where I can find this prebuilt stylesheet and how big it is?
but I really do love water css, no classes required on your html and only a few kb and you can easily override using higher specificity
Hm it looks like tailwindcss only offers the js file. Couldn't find prebuilt classes. Why are you trying to avoid the build step? You don't want to deal with the additional stuff to manage or is there another reason?
you can find hacks to compile the whole tailwind CSS, every combination, but the results is like over a megabyte
if you're interested in something like tailwind then search for "css utility framework" and you'll find a ton
And if you still want to stick with shadcn/ui and not have a separate build step, you can probably copy-paste whatever it needs manually - not just from shadcn/ui as it intends, but from Tailwind as well.
at this point it would be more productive to just use the build step because setting it up is trivial
cljdoc uses tachyons https://tachyons.io which is a utility css framework and has a version you can customize with variables. it's pretty decent if you like utility css
no build step with tachyons
or rather the build step was completed in the past, as you'd expect with the name tachyons
Bulma might be an option too. https://bulma.io/
If you think that the build process is going to add additional complexity then you shouldn't be worried about it because the setup takes only 5 steps and you only need to specify the files that you want tailwind to watch and where to output the css ( https://tailwindcss.com/docs/installation ).
Bulma looks interesting and you can use it without the build step but 633kb
oof.
@U02S4QZAH61 thank you, I do not want to use Tailwind. I have been using vanilla CSS for years and I would prefer to rely on web standards to specify style. I just want something that I can bring in to bootstrap my projects with some nice defaults that I can then tweak and customize with CSS variables and my own CSS overrides.
yeeaaaahhhhh
that's the downside to these component frameworks
they're so huge
Thanks to your search suggestions Cora I have found there are actually billions of these lightweight CSS frameworks. Will take me some time to work through them. In the mean time the task of procrastinating away today's working hours has been an unmitigated success. 🎉
Water looks really cool and I like the look of simple.css too. Will continue the search and report back!
oooh simple.css does look nice. far too many options and far too little time but I'll try this next time I need a just-make-it-look-ok css file
Haven’t used it myself, but Adam Argyle’s Open Props perhaps? https://open-props.style/
It’s pure css variables, I don’t even know if there are pre built components
late to the party, but this hasn’t been mentioned yet: https://missing.style/ used it once, liked it enough. https://missing.style/docs/variables/.
I'm not sure about the vars part but I've always liked the css-in-cljs direction and https://github.com/BrianChevalier/radiant made a pretty good try at it
When you profile for performance, there's the good one, where nothing is wrong, the medium one, where you find some small issues that might drop rendering to below 30fps, bad ones where you start to notice things like render lag and stuttering, horrible ones where you see pauses of 10 seconds.... And... well... the one I just did on my plug-in...
Well... turns out the problem was on BEncode parsing.
Some optimizations, and it's now 10x faster!
Old version first, new version second. Did the same interaction in both cases (opened a webpage that had a lot of logs to STDOUT). Problem was on an expensive conversion I was doing twice, and because I was using mutability.
Yep - mutability. I was keeping a state in an atom
object, and swap!
ing at every bencode fragment that I received via a socket. This, with some persistent
data structures and other tricks did the job
Well... turns out the problem was on BEncode parsing.
Some optimizations, and it's now 10x faster!
Old version first, new version second. Did the same interaction in both cases (opened a webpage that had a lot of logs to STDOUT). Problem was on an expensive conversion I was doing twice, and because I was using mutability.
Yep - mutability. I was keeping a state in an atom
object, and swap!
ing at every bencode fragment that I received via a socket. This, with some persistent
data structures and other tricks did the job