Discussion:
!important: css versioning, and a semantic shift
(too old to reply)
Dennis Heuer
2018-01-15 13:55:19 UTC
Permalink
Raw Message
Hello,

I read a lot of fatalistic comments the last days and wonder if you ever
recon'ed that you are at github, a platform for concurrent versioning. I
don't know what you try to reach but 20 years of css also means that
there was enough time lost to be allowed to do a cleanup. My proposal
is to 'invent' a rule like:

@css: 3;

to make a cut and release you from your should-we-leave-that mentality.

Any page not including this rule is interpreted following css21, and
everyone's fine :) No zillion broken websites and what I had to read
already!

Let's allow cleanups to lift our souls from the suffrage of 'I'm a web
designer - I write stupid stuff - I hate my life!'

But there's more to it, as I already wrote the last days, specifically
about fonts! I mean, you can pledge for certain fonts but you can't
write a @font-metrics rule to choose a layout for the actually chosen
font (yeah, JavaScript, hurray!)

Web designers need to draw semantic decisions. Even more finegrained
pragmatic factual properties and lots of choice, like xx-small to
xx-large, doesn't really serve to this. That's why we all use 'em'.
But there is no 'em' for font-weight and so forth. Specifically, there
is no catch when it ain't work! Let's come back to the rule I proposed:

@font-metrics: ...factors to get a clou of actual font behaviour...

Say, font libraries (also on font servers) can cache benchmarks to
provide factors that can roughly make a guess about how a system font
will behave as a substitute to enable the css declarations to draw
conclusions from this.

Say, a user switches to system fonts with big presence/weight and size.
The rule @font-metrics, in combination with the rule @media, could
decide that now the layout should switch from nifty to blog style. This
is a semantic (context-based all affecting) decision and I'd love to
have this...

Think about it...

Regards,
---------------------------------------------------------------------
Dennis Heuer
***@verschwendbare-verweise.seinswende.de
Florian Rivoal
2018-01-16 00:29:35 UTC
Permalink
Raw Message
Post by Dennis Heuer
Hello,
I read a lot of fatalistic comments the last days and wonder if you ever
recon'ed that you are at github, a platform for concurrent versioning. I
don't know what you try to reach but 20 years of css also means that
there was enough time lost to be allowed to do a cleanup. My proposal
@css: 3;
to make a cut and release you from your should-we-leave-that mentality.
Any page not including this rule is interpreted following css21, and
everyone's fine :) No zillion broken websites and what I had to read
already!
Things along this line have been suggested and considered multiple times
over the years, but ultimately rejected, as that would not work.

Any page without "@css: 3;" will be interpreted as css21. But initially,
so will any page that has "@css: 3", because browsers that don't know
about it (currently all of them) will just drop this line, an render the page
as usual, and so even browsers who would want to use special css3
semantics would have to render it using css21 rules, otherwise the
pages would work differently in different browsers, which would be
terrible.

We could instead have @css3 { ...put your stylesheet here... }, as that
would be ignored by old browsers, but even then every (new) browser
would have to support both the old way and the new way forever, which
is quite costly. For authors, it would be costly as well, as they would
have to write their stylesheet twice: once using @css3{} for new browsers
and once without it for old ones.

Even though everybody recognizes that some decisions made in the past
are not ideal (see here[1] for example), and that this causes some pain,
the pain is not nearly enough to justify making everybody do twice the work.

For all its quirks, the fact that new web pages can work in old browsers (with some
graceful degradation) and old web pages work in new browsers is a huge strength
of the web, even if it does have the downside that we have to live
with the mistakes of the past.

—Florian

[1] https://wiki.csswg.org/ideas/mistakes
Dennis Heuer
2018-01-16 02:04:37 UTC
Permalink
Raw Message
Hello Florian,

On Tue, 16 Jan 2018 09:29:35 +0900
Post by Florian Rivoal
Things along this line have been suggested and considered multiple
times over the years, but ultimately rejected, as that would not work.
I totally disagree!
Post by Florian Rivoal
don't know about it (currently all of them) will just drop this line,
an render the page as usual, and so even browsers who would want to
use special css3 semantics would have to render it using css21 rules,
otherwise the pages would work differently in different browsers,
which would be terrible.
Hmm... I come from browser-war times and know what you mean! I also
survived css1 lack of clarity. Internet survived! But there is a deeper
misunderstanding in your saying...
Post by Florian Rivoal
that would be ignored by old browsers, but even then every (new)
browser would have to support both the old way and the new way
forever, which is quite costly. For authors, it would be costly as
well, as they would have to write their stylesheet twice: once using
@css3{} for new browsers and once without it for old ones.
They won't! They'd stick to prepared scripts, ready-made scripts from
the net (think of normalization scripts), tools, languages like sass or
lesscss, more javascript etc. Also, much of the changes is convertible
automatically relatively easily. And those tools would be available...
Post by Florian Rivoal
Even though everybody recognizes that some decisions made in the past
are not ideal (see here[1] for example), and that this causes some
pain, the pain is not nearly enough to justify making everybody do
twice the work.
They'll do so or so when they start using css3 because they
neccessarily need to serve fallbacks. See all the hacks already
provided in blogs and wikis. There are so many cascading tricks to not
step into the mess. Look around! The mess is already there! The css3
mess would step out of this over time! That is a chance! Don't keep
people in the mess because of the fear of mess!
Post by Florian Rivoal
For all its quirks, the fact that new web pages can work in old
browsers (with some graceful degradation) and old web pages work in
new browsers is a huge strength of the web, even if it does have the
downside that we have to live with the mistakes of the past.
You do so as if this would work just so!
Post by Florian Rivoal
—Florian
[1] https://wiki.csswg.org/ideas/mistakes
Regards,
---------------------------------------------------------------------
Dennis Heuer
***@verschwendbare-verweise.seinswende.de

Loading...