Let’s do this…




You can’t make a web that’s world-wide, by saying it works on my machine, and everyone else is an edge-case.

Web for all. Web on everything.




Web for all. Web on everything.

[DEMO]
across devices, and over time


It is required that HTML be a common language between all platforms…
…This implies no device-specific markup, or anything which requires control over fonts or colors.






The fact we can control a paper page is really a limitation of that medium.
@media
min-width
@media
prefers-reduced-motion
@media
hover
@supports
container-type: inline-size
HTML totally eliminates any visual creativity that a document’s designer might have.



The web would have become a giant fax machine where pictures of text would be passed along.


…Allow the author to attach style hints.
Styles are suggestions or hints about behavior, not rules…

Provide hints that the browser may or may not use.
A set of HINTS or SUGGESTIONS to the renderer which might be used…

Provide authors and publishers with stylistic influence without resorting to page description languages.





The CHSS proposal is explicitly designed around this collaboration

This proposal tries to soften the tension between the author and the reader.

The user/browser specifies initial preferences and hands the remaining influence over to the document [authors].
/* a 'declaration' */
property: value;
/* a 'declaration' */
color: blue;
/* a 'declaration' */
color: blue 64%;
36% of the influence/* a 'declaration' */
color: blue !important;
/* a 'declaration' */
color: blue;
/* a 'block' */
{
background: white;
color: mediumVioletRed;
}
<!-- 'inline' (or 'element attached') styles -->
<p style="
background: white;
color: mediumVioletRed;
">…</p>
<p style="color: mediumVioletRed;">…</p>
<p style="color: mediumVioletRed;">…</p>
<p style="color: mediumVioletRed;">…</p>
<p style="color: mediumVioletRed;">…</p>
<p style="color: mediumVioletRed;">…</p>

…A simple mapping between HTML elements and presentation hints.
/* a selector, with attached declarations… */
/* a 'style rule' (or 'rule set') */
p {
background: white;
color: mediumVioletRed;
}
<p>This is a short paragraph</p>
p { … }
<!-- a 'style sheet' -->
<link rel="stylesheet" href="styles.css">
/* another 'style sheet' */
@import url('styles.css');


An ordered list (cascade) of style sheets.
<button type="submit" id="send" class="action">
button { background: gray; }
.action { background: darkBlue; }
[type=submit] { background: darkGreen;
background: var(--submit, black); }
#send { background: maroon; }
#484d63
/* a 'declaration' */
color: blue 64%;

* including Editor’s Draft proposals
<button> Needs
One Background-Color Color Padding-Left Margin-Inline-End color,padding-left,margin-inline-end, etc.applying declarations to selectors
removes extra values
fills in missing values
0+ declared values)0|1 cascaded value)1 specified value)1 computed value)1 used value)1 actual value){
"known": "source:css-cascade",
"note": "- Cascading and Inheritance are central to all of this,\n- The spec is named for those two steps\n- But they aren't the whole story\n"
}




.short { border: thin double; }
.long {
border-top: thin double;
border-left: thin double;
border-bottom: thin double;
border-right: thin double;
border-image: none;
}
border-imageBorder is shorthand for setting all of them.short { border: thin double; }
.long {
/* declared */
border-top-width: thin;
border-top-style: double;
/* reset to 'initial' value */
border-top-color: currentColor;
border-image: none;
}
width, style, and color of eachcurrentColorborder-image which is reset-only here


/* a 'declaration' */
property: value;
this forms the series of steps in our funnel, asking…



This proposal tries to soften the tension between the author and the reader.

The user/browser specifies initial preferences…
from the user agent origin

demo:
/* initial values */
display: inline;
background: transparent;
color: CanvasText;
font-style: normal;
flex-basis: auto;
/* etc. */
display:inline, even on divs…html { display: block; }
body { display: block; }
p { display: block; }
div { display: block; }
article, aside, footer, header, hgroup,
main, nav, search, section { display: block }
address { display: block; }
blockquote { display: block; }
/* etc etc */
display:blockbody { margin: 8px; }
a:link {
color: blue;
text-decoration: underline; }
h1, h2, h3, h4 /* etc */ {
font-weight: bold;
font-size: something big I dunno; }
8px margin on the bodyresource://gre-resources/from the user origin

[CSS] provides author and reader with the same notation…


Settings / Advanced / Style sheet…about:preferenceschrome://settings/appearance
all of us read other people’s web sites
from the author origin



This proposal tries to soften the tension between the author and the reader.

If conflicts arise the user should have the last word
If a trade-off needs to be made, always put user needs above all.

!important to a declaration…
!important mirror universeresource://gre-resources/
!important behaviorWith our own colleagues and libraries
From higher origins breaking important things

in transitions and animations
hotPink
»
teal
hotPink
rgb(93 138 220)
?!
teal
hotPink and tealbutton {
background: teal;
transition: background 1s;
}
button:hover { background: hotPink !important; }
:target { animation: bg-change 3s ease-in both; }
@keyframes bg-change {
from { background: pink; }
to { background: cyan; }
}
animation property is in the cascade!important keyframes: present, debug!important, and then it’s reversedstyling web components
Context in the cascadesimilar to user agent origin
(demo if needed)
and reverses priority
cascade-layers
@layer settings { … }
@layer tools { … }
@layer generic { … }
@layer elements { … }
@layer objects { … }
@layer components { … }
@layer overrides { … }
!important

-> Layers -> Importance
@layer reset {
[hidden] { display: none !important; }
}

Web for all. Web on everything.

<p style="color: mediumVioletRed;">…</p>
<p style="color: mediumVioletRed;">…</p>
<p style="color: mediumVioletRed;">…</p>
<p style="color: mediumVioletRed;">…</p>
<p style="color: mediumVioletRed;">…</p>




Graphic design of unknown content with unknown collaborators, on an infinite and unknowable canvas, across operating systems, interfaces, languages, and writing modes…


A Jedi uses the [Cascade] for knowledge and defense, never for attack.