terribleMia’s avatarterribleMia’s Twitter Archive—№ 6,588

  1. 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…
    1. …in reply to @TerribleMia
      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
      1. …in reply to @TerribleMia
        It's like, the opposite concept from CSS Remedy. github.com/mozdevs/cssremedy/
    2. …in reply to @TerribleMia
      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?)
    3. …in reply to @TerribleMia
      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)
    4. …in reply to @TerribleMia
      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…
      1. …in reply to @TerribleMia
        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
        1. …in reply to @TerribleMia
          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%)."
          1. …in reply to @TerribleMia
            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…)
    5. …in reply to @TerribleMia
      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
    6. …in reply to @TerribleMia
      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…
      1. …in reply to @TerribleMia
        "For discrete values, e.g. the font family, it may not be obvious how to mix 40% helvetica and 60% times."