Pico CSS Framework
picocss.com
picocss.com
Same idea and Pico (classless, simple, small etc).
For those interested in Pico (which is already on the list), you can preview it on some boilerplate HTML here[1] or use the Javascript bookmarklet[2] to preview how it would look on any arbitrary page, which can be helpful for prototyping a new site.
[0]: https://github.com/dohliam/dropin-minimal-css [1]: https://dohliam.github.io/dropin-minimal-css/?pico [2]: https://github.com/dohliam/dropin-minimal-css#bookmarklet
@dohliam do you have some favorites, ones with the least "errors" and non-standard paradigms?
Unordered lists look okay to me[0], but it's possible that you are referring to the navigation section at the top of the page which technically contains a UL as well. This is just a boilerplate HTML5 template[1] with Pico CSS applied on top, so it seems that Pico doesn't have special handling for this particular usage of ULs nested in NAV elements (some frameworks turn these lists into a navigation bar or even dropdown menus, but it's interesting to compare how each of them works out of the box).
> the cursor remains "default" instead of switching to "text selection" when you hover over text
This is directly from Pico CSS itself -- check out the homepage[2] and you will see that the same thing happens there as well.
[0]: https://dohliam.github.io/dropin-minimal-css/?pico#text__lis...
[1]: https://github.com/cbracco/html5-test-page
[2]: https://picocss.com/
- Have some popularity measure (github stars or otherwise) either in your list or hosted somewhere
- Have screenshot previews of anything, hosted somewhere (would be a bit quicker to browse through the list).
This is also why I hate Windows WPF so much: If you just add a label, a field, and two OK/Cancel buttons to a form, it will look horrendous by default. Only if you manually or deliberately set up some styling for it, will it start to look sensible.
I want gui frameworks to look sensible out-of-the-box, without cluttering everything with piles of boilerplate crap.
You should check out Cascading Style Sheets. They let you write your document semantically in HTML, and then it is styled by a separate document created by the company stylist.
I used to love those Javascript/jQuery widgets that attempted to create a whole new bespoke alternative to native form widgets, but I much prefer the OS to style them for me, since the JS (or even CSS) variants can break and look/feel borked on different devices. Inherited system UI FTW
Any recommendation for a lightweight and complementary JavaScript library? Validate forms, XHR wrapper, etc. without the bulk of jQuery.
That does 90% of what I need when sprinkling backend AJAX-y interactivity on a straight HTML page with a backend that sends JSON or HTML back.
https://htmx.org/examples/inline-validation/
For more jquery-esque fine-grained control for building custom elements/components on my pages I turn to:
I love both of these libraries.
https://gist.github.com/egeozcan/cdc90e290271f3ea4b6801dcf1a...
I should mention, I did want it to be quick and dirty (it's a prototype), but well, it could have been a bit more concise. Double set parentheses come from the templating system I use BTW, if it wasn't clear.
Being HTML oriented is very cool, and you get a lot of things for free, but I keep saying "oh this would have been much easier with react" a bit too much.
> Any recommendation for a lightweight and complementary JavaScript library?
> Validate forms, XHR wrapper, etc. without the bulk of jQuery.
Today, targeting modern web browsers? Vanilla Javascript, really.Since ES6 (2015) Vanilla Javascript has been very good. Form validation is free with HTML5, XHR is already wrapped with a one-line Promise API.
Seems there are some more ideas here: https://www.technotification.com/2019/06/5-lightweight-jquer...
It's no coincidence that we use classes to explicitly apply styles, I don't think this library is a good idea.
It's the same issues as changing native prototypes in Javascript, stuff depends on the defaults to be exactly as specified.
Explicit > Implicit Stuff magically working is great until you need to make an exception.
.pico-enabled *:not(.piko-disabled) {
@import "layout/document"
@import "layout/sectioning"
@import "layout/container"
...
Then you can do this: <div class="piko-enabled">
...
<button>A button with Piko styling</button>
<div class="piko-disabled">
<button>A vanilla browser button</button>
... and any 3rd party components/elements etc ...
[1] https://github.com/picocss/pico/issues/31#issuecomment-91399...It's a complete base CSS framework in just over 1kb of code.
It's ironic it declares itself to be semantic, but then tells you to use a link when you need an inline button. I'm guessing because, by default, their buttons are 100% width, which is a really weird default if you ask me.
Also, there are no button or form element sizes? This is essential IMO for anything other than a simple login form.
I've tried to keep it really simple so that folks without css knowledge are also able to hack on it while building their sites.
Would be happy to hear your feedback on it :)
Any third party library or component you use will be affected by "classless". There's a good reason explicitly define classes.
It's the same reason you don't change native prototypes in Javascript. Libraries assume the defaults, both for styling and code.
So instead of a component assuming, it needs to be pointed to the tag you, as developer/designer, require - perhaps via a config parameter. Interesting comment about using SASS to namespace, but then the elegant simplicity of these stylesheets starts to get chipped away IMHO.
I only have a handful of HTML pages with a bit text and code. Nothing fancy.
My main goal is to keep all code in the HTML files with as little boilerplate as possible.
Why the demand for "classless"?
Example: In a particular context (say the <h3> tag in the <header> of each <section>) I almost always want a default style. On changing that style, I don’t want to modify markup. In future, when adding more pages, I don’t want to remember the particular combination of css classes that I’ve used elsewhere. When a particular face out is different (this <article> is a modal) then I can add meaningful class names to convey intentions.
From a practical perspective, I’ve found it to give me 90% of the UI I want at 10% of the cost.
As a dev I've been out of the frontend game for a few years, when BEM was widely used. When I started working more on frontend again a few months ago I tried to look around for developments in terms of methodologies (e.g. "is there a 'next BEM'?"), but didn't really find anything and didn't even know where to look. Even just hearing about newer aproaches like CUBE would be nice, regardless if they end up being fit for production usage.
* https://adactio.com * https://piccalil.li/blog/ * https://stephaniewalter.design/ * https://www.baldurbjarnason.com/
This post has some good pointers: https://www.baldurbjarnason.com/2021/what-do-i-need-to-read-...
I'm not sure what other advice to give. A lot of this was collected over time in response to frustrations I felt around the direction front-end has been moving in (css-in-js, atomic css etc.) and looking for people writing criticisms of it.
I certainly appreciate that "Old Web" feeling from the time before CSS when Browser default/built-in stylesheets were more opinionated and tried to do nice things without forcing you to do all of your styling by hand. Classless frameworks can feel like a good throwback to that era, and a useful compromise from today's browsers' awful default styles and the sorts of CSS frameworks that include everything and a kitchen sink and are designed much more for "apps" than just a clean document full of information.
It's just a bunch of code examples and text, so no fancy layout or styling is needed.
I just want a modern look, without much hassle.
I had the impression, if Tailwind has one thing, it's a multitude of classes.
I suppose if you're throwing together some hacky admin page that 2 people are going to use in a year, it makes sense. Otherwise I don't see why you don't just design your site.
I have to build a _lot_ of those across all sorts of contracts that I do.
Libraries like Pico CSS and htmx [0] let me do this incredibly rapidly, with it looking fine and working great, while keeping the maintenance burden low for the future
It's not just "fun," it's necessary to create an optimal user experience for every particular use-case. Have you ever played two video games which have the same UI? I'd be surprised if you have. Each and every one has its own interaction patterns, its own design language, and its own visual hierarchy.
I absolutely want the web to have better builtin widgets with common functionality and accessibility, but the point is not for them to look the same, but rather work the same.
Generally that includes looking consistent to some extent.
I already know how to use a select element, why style it so I think it's a text field? I already know how to use a button, why style it like a link? I already expect certain features to look and work a certain way, why burden me with learning it all over again?
You can customise it https://picocss.com/docs/#customization
b) every use of an element is for the exact same purpose (also rare)
Styling is done by combinations of elements. Consistency between those combinations is good design.
I might be an odd duck, but I would love it if most sites looked the same. I'm also one of those that loved interfacing with apps that used windows 98 templates and interface wise functioned the same instead of reinventing everything differently.
90% of times I'm visiting a site or opening an app, it's because I want to interact with its data or functionality. The more it adheres to my assumptions and pattern recognition, the better.
No, I'm not a robot, but I get my creative side tickled elsewhere.
I disagree with your other complaints though. Buttons are pretty obvious based on context clues and placement, as are highlights. Text fields also rely on context to communicate their function and furthermore more, they are labeled. As is the colour picker…
I’m curious to see examples of an inline color picker you like, as well as how you generally expect forms to be styled. I looked for a few minutes through some UI libraries I like and basically all of them handle the color picker the same way.
The other pickers have icons to indicate what they are (calendar and clock) so why not a color palette to provide a similar hint?
Needing to read the context to figure out if it's a button or a text field does not help when quickly scanning the page. Figuring out the context and reading the labels is totally unnecessary extra work that a better design wouldn't require.
I wonder where they went.
Also, in another comment someone mentioned their own Sakura CSS and it's also SCSS based.
You can still use a preprocessor like SASS with that stuff, but it's just another layer of complexity for not a whole lot of value outside of familiarity.
> Not fond of Pico.css’s weight, though: over 50KB, nowhere near as lightweight as the name suggests (even if it’s above-average compressible, 8KB gzipped—but I wouldn’t count even 8KB uncompressed as pico); in this case, if you flatten the variables and strip unused code, you’re left with under 4KB (~1.4KB gzipped). Lots of bloat from unused light mode support, things like form controls, and a fair bit of frivolous custom properties usage. This is the sort of place where I see the appeal of the likes of Tailwind, because they generate such huge amounts of CSS that you just about have to use an unused style remover. But it is another build step, and contrary to the deliberate intent here.
This also means that they can easily be used by others as well [1]. Have gotten some folks contribute their own themes over the years.
I also had friends who didn't want to understand CSS, and adding in media queries, variables, and dark mode support would only just confuse them even more.
Also, the demo does a great job of highlighting exactly how it works.
That said I tried to use pico and bulma in small personal project and it's handy to have a baseline. The problem is that you inevitably spend most of the time later override and fighting the said frameworks that helped you get going quickly. So I wonder, if you know CSS, are you really saving time?
You might be interested in tailwind. I'm unsure how to explain it, but it is a pleasure to use once you get used to it.
Personally, I love the semantic value of a well-structured HTML document, but both approaches definitely have their advantages.
At the price of a verbose class soup everywhere.
I can’t bear to look at the soup so I don’t use it much.
IMO you can plan for the most likely course of long-term maintenance, choose a framework that matches, and be in a much better position. Especially if your site can quickly leverage the often nasty stuff like accessible form or menu frameworks, or modals.
Plus, it's really not that hard to override most old frameworky parts for changes that work well enough. Details involved, yes. But clever solutions are really abundant at various levels. This is also why "elegance" in frameworks is a thing.
ITCSS makes you think and work with the cascade resulting in almost never reverting anything. Super efficient.