Matcha.css – Drop-in semantic styling library in pure CSS
matcha.mizu.sh
matcha.mizu.sh
That said, I don't love the default design choices here -- colors and "polish." I'm not a professionally trained designer, but I've hand rolled enough software that users eventually complained about to sense when something "feels off" compared to what a really good designer creates with a background in color theory, information density, gradient shadings etc.
If the author is here, have you considered leveraging the aesthetics from other FOSS projects like bulma or tailwind, or collaborating with a professional designer? I know jgthms is sometimes on this site.
But yes, designers trying to conform to a corporate look can spend hours on spacing etc. I suspect this isn't for them.
One example of something that feels off is the button styling on hover, dark backgrounds with black text doesn't work well aesthetically or for accessibility.
Having a more polished default set-up will be the cherry on top.
Edit: I think maybe the color on the tea cup is what is feeling a little off to me. Overall I love the logo, but I perhaps if the tea cup color was changed to be closer to the background color at the top?
To be honest I was kind of taken aback seeing this on HN because it was posted before I could do a show hn myself
I'm not a frontend dev nor a designer so it can be indeed apparent that I lack knowledge on color theory, accessibility concerns and other aspects that may seem obvious for other people. Probably hence the "artisanal" feel too.
I'll research more about the things you mentioned in the future. As for collaboration with a professional designer I'm open to receive advices, but I don't plan especially on hiring one as it's a side project. I don't think currently that professionals are the target audience for it, but I guess it'll definitely appeal more to hobbyist
Here's a possible all-CSS solution:
I googled what “classless” meant for this library after another user commented and found the link below if folks are interested in similar libraries.
I agree with this, but it would also be a nightmare for people trying to make their own styles. Even the current default styles are a bit annoying for this. I've long dreamt of some sort of way to switch between some sort of chrome vs content styles. So for my navbar and embedded visualizations/interactive elements I switch to chrome mode and get minimal default styles (maybe just font size, font family and text colour) but the main content of the article can get the user's preferred styles.
The obvious solution would be a CSS instruction that really reset (like everything to 0, none, etc. — not to default styles) all properties for the selected elements and its children. Something like:
:root { default-style: none; } /* could be "none" for reset, or "default" to apply the user-agent default style */ *, *::before, *::after { all: unset }
?If we replace the default styles, a ton of sites are going to look very different than they were intended. We could do an "opt in" though that should be very easy to declare (similar to new versions of HTML, such as HTML 5) and get you on the new default style. I think that would be great!
Flask + HTMX + AlpineJS + PicoCSS is currently my "All Python and HTML SPA"
Who else needs underline?
imo, if you're building a new library, this level of accessibility should be baked in. Given the aim of the library to have better css defaults, expecting developers to override the link styling to add underlines or expecting the users to install browser extensions to do that, feels like a weird requirement.
Subjectively, I also don't agree that it's ugly. There are also other options like border-bottom or dashed underline or pseudo-elements with additional symbols.
(However, I'm not sure color-only link distinction is actually an issue. It's never been considered problematic in accessibility reviews of the corporate sites/apps I work on professionally.)
A cursory look suggests that matcha.css is a little more advanced. Will give it a shot.
Some examples:
- https://andybrewer.github.io/mvp/
- https://oxal.org/projects/sakura/
- https://yegor256.github.io/tacit/
- https://chimera-demo.vercel.app/
- https://watercss.kognise.dev/
- https://missing.style/
Alas, matcha doesn't even look that promising. There is no demo page to quickly see styled elements, the color palette is garish and the default button hover is illegible, with dark background on dark text. It certainly needs more polish.The demo page is supposed to be the website itself which is intended as a documentation too (you also have a basic website previewer at the begining).
It definitely needs some more polish, but I wasn't expecting this being posted on HN this early
And now it's 2024, and people on the web routinely cripple scroll bars to make them an UX nightmare.
The enshittification of UI/UX in browsers due to CSS allowing to completely ruin OS-provided standard controls that used to work just fine is a disgrace.
Please don't use this.
OS provided standards controls became worse over time. (see: Apple's disappearing scrollbar and rounded checkboxes)
We can't easily change those, but we can use CSS to at least improve upon those standard controls.
Just because Apple is on a mission to ruin their standard controls does not mean those on other operating systems should artificially be forced to also get their UX ruined.
I know HN looks dated. But the very textarea control I am writing in right now can be resized with a standard grab handle, and has working scrollbars and keyboard navigation.
Another list mentioned in that discussion that includes screenshots: https://github.com/dbohdan/classless-css
There are so many options! The most valuable info at this point is how usage works out in practice.
Some people aren't specialized in front-end (or they just find it boring) so they're more the target audience. I did this because I wanted to avoid having to redo an UI each time I started a new hobby project
While there are customization options, it's really intended as just being an include without the need of changing anything else in your documents
What a creative way to demonstrate the lib. I'm excited to give this a try; I hope it's as graceful as demonstrated!
It sounds like it is a css file which styles standard html elements.
But I'm not sure. If so, where is the css file? And what are those 200 files in the git repo?
I use them all the time for internal stuff because it lets me write some dirty html and have the backend do the real work while not looking browser-default-hideous.
If you need something more complicated, these are probably not meant for you.
Anyway more "professional contexts" probably have their own branding too, so the added value is probably negligeable in this case
The hundreds of files in the repo are just for maintainability and organization, but in the end it'll result in a single file to include, although you can also individually select which part you want to include if you'd like