
‘CSS X’ - praveenscience
https://www.w3.org/blog/2020/03/css-x/
======
akersten
This article is a masterwork in expanding a single sentence ("CSS gets a new
conceptual version every few big modules") into an absolute saga.

As I was reading through I was worried I was about to read an article about
how some big company was going to recreate CSS from the ground up because
there's too much cruft or something. A relief!

~~~
uallo
> "CSS gets a new conceptual version every few big modules"

Where in the article does it say anything like that? The article does not
present any decision in that regard at all. It summarizes the history of CSS
and the discussion about whether or not to (re-)introduce some kind of global
CSS versioning. It presents some suggestions and concerns from the community.
But it does not introduce anything.

~~~
akersten
It's the last sentence, which one could be excused for not enduring the rest
of the article before reaching:

> , a precise definition of ‘CSS X’ isn’t even needed. Every three years of
> so, some people should pick a couple of interesting new modules that were
> added in that period and start writing about them, under the heading ‘CSS
> 4’, then ‘CSS 5’, etc. ‘CSS X’ is defined as those two or so modules, plus
> whatever was in the previous version and a loosely defined set of other
> modules.

I said "conceptual" because it's just some person's opinion about versioning,
and the article does say the CSS working group doesn't really care for
versioning at all. Either way, my opinion was that the article is about 95%
too long, I'm making no other claims.

------
kumarvvr
I wish there was more done in CSS for generation of print documents.

I mean, precise sizing, pixel perfect placement, layouts, etc, that can be
printed as PDF pages.

I know there are print related media settings, but they seem overly complex
and paid libraries have cropped up, which abstract away the complexity, but
charge to provide usability.

HTML & CSS, conceptually, are world class technologies. Separation of content
and styling, theoretically, should be able to display / output documents for a
wide variety of targets. However, media queries are based on screen pixel
sizes. I don't know if its even possible, but I would love to define media for
PDF documents, Word documents, etc.

~~~
phonon
[https://books.idea.whatwg.org/](https://books.idea.whatwg.org/)

~~~
kumarvvr
Thank you for this. First time I have come across this. Looks very
interesting.

------
toastal
Sure the naming conventions for for versions are arbitary, but there's still a
lot of exciting stuff in these pipelines regardless of name. I love how much
the definition of "color" has expanded in CSS4. You can query on color gamut
range and define your own color spaces. CSS5 is getting color operations based
on lch so you don't have the gamma squaring issue that plagues Sass and Less.
I like that the direction isn't just to copy these preprocessors but make it
better from the start.

------
maxharris
I used to get really angry at CSS because of all of the things that made it a
bad fit with component-based systems like React. It made me so unhappy that I
worked full-time for about nine months on this project, which was a React-like
component system that rendered to canvas.
[https://github.com/maxharris9/layout](https://github.com/maxharris9/layout)

I got pretty far! But I gave up working on it when I realized that I was going
to be pushing this boulder uphill for years.

So what changed? I picked up Swift and SwiftUI, and it turns out that some of
the ideas that I had were the same ones the SwiftUI folks went with!

For all the web has given us, I think its APIs are holding us back now. I
still think we need something open and decentralized that competes with the
App store and Play store, but one that offers apps that use basically the same
APIs and technology that the native apps use.

Last thing: I know Apple cripples browsers on their platforms. I've run into
all those issues personally in my work! That still doesn't make the web the
right thing. Here's James Mickens telling us how to fix the browser's busted
architecture:
[https://www.youtube.com/watch?v=1uflg7LDmzI](https://www.youtube.com/watch?v=1uflg7LDmzI)

~~~
filleduchaos
This is part of why it bemuses me to see web developers cling so hard to using
HTML/CSS beyond the browser. I'd much sooner tangle with a proper UI SDK
designed from the start to support applications than fight with a
layout/painting engine that relies on a document model. The sheer inability of
CSS to handle dynamic heights should be frustration enough for anyone.

~~~
deergomoo
Even layout aside (I'm hoping Houdini will eventually bring some form of
constraint-based layout to browsers), HTML is the lamest UI toolkit going.

We've got a handful of basic form inputs, incredibly inflexible tables, and
some semantic rectangles. That's basically it.

Even the form inputs can be a pain. It's insane to me that the only way to
change the background colour of a checkbox is to hide it and build your own
with CSS hacks (pseudo-elements etc.).

I guess the fact that any element needs to function purely from markup without
any code severely hampers them, but I can't believe how much time we're all
wasting having to build things as basic as pop-out menus by hand.

~~~
danShumway
> HTML is the lamest UI toolkit going

I will die on this hill. HTML is not a UI toolkit or an SDK. It is a user-
facing interface.

I know it gets presented as a toolkit, I know that on some level it overlaps
with a toolkit/layout language. But the most important thing HTML does is it
provides a plain-text user-facing interface for an app.

Complaints like this are kind of like arguing that the terminal is a bad
layout tool. I guess? But many of the things that would make the terminal into
a better layout tool would get in the way of forcing developers to provide a
pure-text interface for their apps.

In the same way, many of the features people want to pull into HTML (data-
bindings for tables, content reflow between arbitrary elements, arguably a lot
of the custom element/template work that Google is doing) are kind of
counterproductive once you start looking at HTML as an interface instead of as
a programming tool.

~~~
deergomoo
This is exactly my point though. It’s not a UI toolkit, but if you want to
write applications for the web you have to awkwardly shoehorn it into one.
There is no alternative.

It’s not fit for the purpose of building applications. I strongly support the
idea of an alternative.

~~~
danShumway
> but if you want to write applications for the web you have to awkwardly
> shoehorn it into one.

No, you have to treat it like a render target. You can write your applications
with another UI toolkit, you just have to be able to render to DOM.

To go back to the terminal analogy, the terminal is the end-user interface.
It's not a framework or a toolkit. What you're complaining about isn't that
the terminal is a bad UI toolkit, you're just complaining about supporting the
terminal in general.

> I strongly support the idea of an alternative.

The only way that alternative would be easier to work with is if it didn't
force you to render your visual state to a pure-text XML-based UI. But getting
rid of that requirement would be bad for the end user.

It's annoying on purpose, because the default render target for not just your
documents, but also your applications, should mostly be a pure-text XML-based
tree representing your current state. It's a user feature, not a developer
feature.

I mean, I can think of a lot of ways to make web programming easier if we
don't care about the format of the end-user UI. It would simplify things
dramatically if we didn't need to care about stuff like responsive design or
resizable text. But the beauty of HTML is that by default, the easiest way to
build a web application just happens to be the way that supports
screenreaders, adblockers, scraping, graceful degradation, responsive layouts,
etc...

HTML encourages even junior developers to fall into a pit of success by
forcing them to think about the accessible text interface first, before
they're allowed to think about what the pixels on the screen will look like.

~~~
filleduchaos
> It would simplify things dramatically if we didn't need to care about stuff
> like responsive design or resizable text.

...sincere question, have you ever actually used a native UI SDK?

~~~
danShumway
Yes.

Now, I have not used Flutter in specific, but from what I can see from its
documentation, it doesn't support `em` units, so I can't base widths off of
the current font size. The recommendations I'm seeing online for doing
responsive design are to do device queries for the layout or to do percentage-
based box sizes.

Again, I haven't used Flutter, so maybe it's better than the online tutorials
I'm looking at give the impression of. But I'm having a real hard time
imagining how I would recreate the functionality of CSS Grids or Flexbox using
that kind of system.

Some native frameworks do a much better job. I think GTK is pretty good
(although, suspiciously, GTK has ended up copying a lot of CSS features, so
take from that what you will). But even there, it's worth noting that the
developers behind most of the apps I'm familiar with aren't really taking
advantage of modern GTK features.

I have an Arch install with the desktop split between a 4K monitor and a
normal 1920x1080. I also maintain a Manjaro install on an HDPI Surface laptop
with an odd aspect ratio. By and large, the native apps I use are mostly
terrible at handling these scenarios. In comparison, most websites I visit are
handling weird aspect ratios and 2x scaling pretty well.

I'll also give a shoutout to Mac, which I'm not familiar with a developer
platform because heck that, but I assume has decent UI frameworks because more
of the apps I use on Mac actually handle resizing nicely.

In any case, the point I was making was not just that the web is uniquely good
at responsive design. Responsive design is one of the easiest problems that
the web is solving. Now show me a native toolkit that can match the web at
allowing users to override styles or block/replace UI elements. The
significant problem that the web is solving is forcing state to be represented
in an XML tree. That's the important part, responsive design is just one of
the advantages that come from that.

~~~
dragonwriter
> Now, I have not used Flutter in specific, but from what I can see from its
> documentation, it doesn't support `em` units, so I can't base widths off of
> the current font size

Can't you just use the fontSize property and multiply it by whatever number
you were going to use for ems (or maybe multiply fontSize by textScaleFactor
first, depending on how rigorously you want to lock to text.)

~~~
danShumway
Is the `fontSize` property in Flutter user-customizable? If so, yes that would
work fine.

But it would be a weird argument to say that Flutter represents an evolution
over CSS if right from the start I'm being forced to manually reinvent a core
UI primitive.

~~~
maxharris
Why not just learn Flutter or SwiftUI? These systems are only going to
continue to get more popular through the decade.

------
earthboundkid
I think CSS would benefit from having an opt-in system for sane defaults. You
can’t do a real project without a reset stylesheet of some sort, but why? They
should define CSS4 and provide a script type=module style method for telling
the browser to use it.

~~~
jhardy54
CSS has no defaults. The defaults are added by your web browser.

~~~
earthboundkid
The distinction you are making does not meaningfully impact my proposal.

------
lykahb
The version was useful when the browsers had incomplete support for CSS. It
served as a milestone for browser makers to achieve. They could give a claim
of their technological advantage, say 90% of the CSS3 features.

Now the CSS progress is more driven by the browsers than the W3C committee.
Also, CSS does not affect the competition between browsers as much as before.
So, as the flashy tech gets stable and boring, the need to give it marketable
names goes away.

------
abhay07
Off the topic. I don't see many website using 3d transform feature of CSS. I
think it should be explored more. Has much potential.

------
benrbray
> Leading the web to its full potential

Meanwhile, that W3C logo is sporting a radial gradient + inner shadow + drop
shadow combination straight out of 2004!

