Fork me on GitHub
#off-topic
<
2024-05-09
>
Chris McCormick13:05:53

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!

👀 1
p-himik13:05:18

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".

Chris McCormick13:05:30

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. 😍

p-himik13:05:11

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.

Cora (she/her)13:05:55

water css maybe?

👀 1
🙏 1
Cora (she/her)13:05:43

I can't remember if it has variables or not though

3starblaze13:05:25

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).

Cora (she/her)13:05:27

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

👍 2
Chris McCormick13:05:01

Oh that's a cool trick, thanks!

1
Chris McCormick13:05:23

> 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?

Cora (she/her)13:05:49

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

3starblaze13:05:20

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?

Cora (she/her)13:05:55

you can find hacks to compile the whole tailwind CSS, every combination, but the results is like over a megabyte

p-himik13:05:23

Right, and I assume the combinations would be limited to particular number ranges.

Cora (she/her)13:05:25

if you're interested in something like tailwind then search for "css utility framework" and you'll find a ton

p-himik13:05:50

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.

3starblaze13:05:00

at this point it would be more productive to just use the build step because setting it up is trivial

Cora (she/her)13:05:17

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

Cora (she/her)13:05:35

no build step with tachyons

Cora (she/her)13:05:17

or rather the build step was completed in the past, as you'd expect with the name tachyons

😁 1
Daniel13:05:46

Bulma might be an option too. https://bulma.io/

3starblaze13:05:40

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 ).

Chris McCormick13:05:49

Bulma looks interesting and you can use it without the build step but 633kb oof.

Chris McCormick13:05:28

@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.

👍 1
Cora (she/her)13:05:49

that's the downside to these component frameworks

Cora (she/her)13:05:01

they're so huge

Chris McCormick13:05:52

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. 🎉

🎉 3
Chris McCormick13:05:33

Water looks really cool and I like the look of simple.css too. Will continue the search and report back!

1
Cora (she/her)13:05:32

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

Mario Trost15:05:49

Haven’t used it myself, but Adam Argyle’s Open Props perhaps? https://open-props.style/

Mario Trost15:05:22

It’s pure css variables, I don’t even know if there are pre built components

Stephan Renatus19:05:07

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/.

john23:05:18

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

mauricio.szabo23:05:29

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...

😂 4
😅 1
mauricio.szabo02:05:51

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

🎉 6
mauricio.szabo02:05:51

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

🎉 6