-
1994 proposal for Cascading HTML Style Sheets: w3.org/People/howcome/p/cascade.html Includes % weighting on each property, & displays the weighted average, e.g. h2 { font-size: 100px 60%; } /* user styles */ h2 { font-size: 10px 40%; } /* author styles */ Results in a font-size of 64px…
-
IN CONCLUSION I translated the sample CSS from the end of that proposal (as well as I could) into a valid CSS stylesheet. You're welcome. codepen.io/mirisuzanne/pen/mdbadrR?editors=1100
-
It's like, the opposite concept from CSS Remedy. github.com/mozdevs/cssremedy/
-
of the "Unresolved issues" section, 2 have been resolved: - attaching styles to attributes - specificity rules And one is still… not: - scoped styles, nested in html (wasn't this proposed again recently?)
-
Some of the proposals, like: font.size *= 2 100% reflect active discussions in the current CSSWG… - github.com/w3c/csswg-drafts/issues/1594 - github.com/w3c/csswg-drafts/issues/2764 - github.com/w3c/csswg-drafts/issues/2864 …including proposals like: calc(currentValue * 2) calc(inherit(font-size) * 2)
-
Proposal also includes media queries, like: AGE > 3d ? background.color = pale_yellow : background.color = white …I don't think document-age queries are still in the CSS roadmap…
-
Also allows dynamic imports in queries… DISPLAY_HEIGHT > 30cm ? <css-url-1> : <css-url-2> Upcoming SassCSS release supports a server-side version of that, with the new
load-css()
mixin: @ media print { @ include load-css("print"); } github.com/sass/sass/blob/master/accepted/module-system.md#load-css -
SassCSS 🤯🤯🤯
http:// NYT .com/style 30% http:// LeMonde .com/style 70%
"…References two other sheets and assigns them different weights. If no previous style sheets has claimed influence, the resulting presentation will be a mix of NYT (30%) and LeMonde (70%)."
-
Forget about design systems, just load several other site's styles on top of each other, and see what happens. (Makes more sense if you account for the expected small size of style sheets. Adding something like Normalize on top of Sanitize isn't a huge risk…)
-
Here's my quick CSS calc() solution for setting a font-size property of 100px at 40% weight: font-size: calc((1em * 60 + 100px * 40) / 100); 😛 codepen.io/mirisuzanne/pen/eYObOLK
-
You can also set the desired influence-weight for an entire stylesheet. Of course now I want to implement it in Sass somehow, and see what it's like…
-
"For discrete values, e.g. the font family, it may not be obvious how to mix 40% helvetica and 60% times."