Remix.run Logo
▲ shubhamjain a day ago

> To stay relevant, Pico CSS would need a full rewrite: plain modern CSS instead of Sass, built on features it doesn't use today (OKLCH colors, cascade layers, Popover, anchor positioning) with fallbacks for older browsers

Why? Why? Why? I hate how everyone seems convinced they need to adopt the latest and greatest browser features just to stay relevant. I hate oklch and I hate Tailwind popularized it. I don't care how scientifically accurate it is at representing human color perception. It's a PITA to understand a new type of color system, and learn to tweak it, especially when HSL/RGB just worked fine.

▲Gualdrapo a day ago | parent | next [-]

I don't get any of this hate. oklch makes it really easy to create new tones from a starting point and stuff like anchor positioning also makes it really easy to place absolutely-positioned things. So it's not like those "latest and greatest browser features" are there just to complicate your life, but actually the contrary.

This just seems to me like (1) not wanting to learn new things, (2) a logical fallacy because the conclusion that those changes are to "stay relevant" and not to make the life of any future mantainer easier, and (3) fear of the new (https://en.wikipedia.org/wiki/Neophobia)

▲PennRobotics 19 hours ago | parent | next [-]

If you asked me to pick out bright bold blue (#0000FF) and told me the format was "Lightness Chroma Hue" with valid ranges, I would guess "0.5 1.0 240". Not only is this "not visible on any monitor" by a very large margin but the oklch.com calculator states the spec fallback color is Dell logo blue and not bright at all while browsers will render "vibrant purple".

There's not "120 degrees of red, 120 degrees of green, 120 degrees of blue", so blue is not 240. Actual bright blue is hue 264. The "0-255 RGB" bright blue is 0.452 lightness, and max chroma on a really good monitor is something like 0.33. The lightness mostly makes sense, right? 0.5 is halfway between totally dark and completely washed out.

"Ok, so chroma tops at at 0.33" not so fast. You can crank up the chroma to 0.40 and still get either magenta (where lightness is around 0.74) or green (lightness around 0.78). So now you need to know a valid, nonlinear lightness range for each band of colors, because midpoint blue is different than midpoint red which is different from midpoint green.

From greyscale luminosity calculations and knowing about subpixels and bayer filters, I would've been able to guess that green is the color with the highest chroma, but then there's bright magenta, neck-and-neck. Oh. Until I move the lightness slider down on the web color picker, and then everything (especially peaks) in the chroma channel shifts around dramatically... So much for intuition.

While OKLCH makes it really convenient to select colors with properties you like along a gradient, the nonlinearity means either memorizing a bunch of base colors, using a color picker, or converting from a system that is "actually" intuitive. I can't really look at a trio of OKLCH numbers and predict the output color like I'd be able to with RGB, although this is mindful that RGB is also not linear (for the exact opposite reason as OKLCH) and I can only do that from decades of experience.

I'll concede that magenta and bright green and bold blue don't really have a place on the world wide web other than in a company logo, so these are outliers. Still, the OKLCH format is not what I'd call intuitive to a total beginner.

(Also, I'd very much not like to implement OKLCH calculations on a microcontroller until lighting companies start selling OKLCH LEDs.)

▲desolate_muffin 16 hours ago | parent [-]

bro what?

▲ 2 hours ago | parent [-]
[deleted]
▲potato-peeler a day ago | parent | prev | next [-]

> So it's not like those "latest and greatest browser features" are there just to complicate your life, but actually the contrary.

What justification do you have to adopt and replace this with existing solutions with such urgency? Have you researched its compatibility? Are you providing any fallback?

This just seem to like 1) you are not applying your mind why you want this, 2) faulty premise that it makes it easier, because in reality your software never reaches a point of maturity, where its just "done", and 3) shiny object syndrome (https://en.wikipedia.org/wiki/Shiny_object_syndrome)

▲dofm a day ago | parent [-]

I think you two should take this rather pointed dispute outside and resolve it with a duel (https://en.wikipedia.org/wiki/Duel)

▲j45 16 hours ago | parent | prev | next [-]

Standardization is valuable.

▲shubhamjain a day ago | parent | prev [-]

[dead]

▲tasuki a day ago | parent | prev | next [-]

I'm pretty sure I'd hate Tailwind, but please leave OKLCH alone. It is actually ok (as opposed to RGB and HSL which very much aren't ok).

▲dev_l1x_be a day ago | parent | prev | next [-]

How can you hate Oklch?

▲dbbk a day ago | parent | prev | next [-]

This is a strange take, sorry, OKLCH is simply better and it's not that complicated to understand?

▲dofm a day ago | parent | next [-]

OKLCH is as you say unambiguously better and IMO easier to understand than RGB, where choosing relative adaptations of colour is basically pretty fraught.

Alas, in terms of the software people use to mock up designs, very few desktop apps support it. HSL is, for now, the more practical option.

▲chrismorgan 19 hours ago | parent | prev [-]

Perceptual colour spaces are emphatically not “simply better”. They’re better for most colour mixing (which is of more limited application than you may think) and for some sorts of intuitions, but their shape is far more complex, not mapping to the actual screen gamut in any predictable way, making them highly obnoxious for colour selection, because it’s super easy to fall out-of-gamut without realising it (and I don’t know of any tooling that draws your attention to when that happens) so that its entire purpose is compromised, and they’re downright atrocious at handling vivid (near edge-of-gamut) colours.

Take bright yellows as one of the worst examples. Basically the only thing you can do with them is reduce the chroma: any other change will take you out of gamut. As the most extreme case, #ff0 is approximately oklch(0.968 0.211 109.77), and the following minuscule modifications will take it out of gamut: L + 0.0002, L − 0.0001, C + 0.0002, H − 0.009 or H + 0.025.

This is why the creator massaged them into a cube/cylinder: https://bottosson.github.io/posts/colorpicker/, Okhsv and Okhsl. Those are much closer to being uniformly superior to sRGB.

▲j45 16 hours ago | parent | prev | next [-]

Respectfully it's up to the maintainer who decides where they think it shoudl go.

After I read the same I thought, ok, that's what _they_ wanted to do.

Me? I'd love to see what could be rewritten to be 100% future proofed for as many years as possible. But see what that did? I have to share, and see if anyone else already thought of this (I doubt I'm the first ever to have this thought), and maybe, I'll be lucky enough to benefit from someone exploring it already, before I decide to put on a jedi robe and wave my hands to use the force to move AI around.

▲throwaway27448 a day ago | parent | prev | next [-]

> Why? Why? Why? I hate how everyone seems convinced they need to adopt the latest and greatest browser features just to stay relevant.

Presumably we can deprecate the broken shit if we can get people to buy into software upgrades.

▲nine_k a day ago | parent [-]

Are RGB and HSL color models all broken and useless? Yes, I know their limitations. But of all graphical software I use daily. only GIMP supports LCh, and using it is pretty unintuitive.

I see how position-anchor and stuff are coll for complex layouts, but they have poor support on low-power mobile browsers, and, frankly, are not that useful for a minimalistic CSS framework. If you want complicated layouts with non-obvious anchoring rules, you're not the target audience.

Cascade layers are very useful for complex designs with many independently added stylesheets. They would be great to have. OTOH again, if you need this level of complexity, you're likely not the target audience of a pico-sized CSS framework.

I would say that a minimalist framework should make judicious use of CSS3 features, and not try to be excessively clever. In reliable engineering, being smart often means avoiding being clever.

▲throwaway27448 19 hours ago | parent | next [-]

Look all I can say is now that we have LLMs, you'd have to put a gun to my head to target the browser. Worst application platform imaginable. Somehow it's also become a pretty bad document browser.

▲ a day ago | parent | prev [-]
[deleted]
▲pjmlp a day ago | parent | prev [-]

Fashion and CV driven development, used to sell conference talks, books and agency work for "upgrades".