The Future of CSS

(joshwcomeau.com)

44 points | by soheilpro 1 hour ago

7 comments

  • afavour 0 minutes ago
    I’m part of the seeming minority that really enjoys working with CSS. And the way I use it today is so different than I did a few years back, e.g CSS modules, declaring a palette with variables then changing it for dark mode… it’s genuinely great to work with.
  • CharlesW 28 minutes ago
    Since I’m in before the negativity: I love CSS! For whatever reason, it’s always made sense to me. I have great respect for everyone with the tenacity to push on improvements that might take 5-10 years to be in common use, if at all.
  • lioeters 6 minutes ago
    Do we really want functions in CSS? I guess that ship has sailed a while ago, since CSS reached Turing completeness.

      /* Define a function: */
      @function --gradient-to-transparent(--color, --direction: bottom) {
        result: linear-gradient(
          to var(--direction),
          var(--color),
          transparent;
        );
      }
    
    Why not provide better integration with JavaScript, to make this kind of acrobatics unnecessary.
  • lopsotronic 8 minutes ago
    Been waiting a long time for CSS inherit() . . . although I freely admit that (and CSS Functions) open a respectable-sized can of worms. Sort of like what transclusion and conditionals do for document markup.

    Anchor Positioning would be sweet and doesn't feel like it's got so much baggage.

  • jamienk 13 minutes ago
    Still can't tree shake. It's what makes my old css files grow into monsters. I feel like everyone has given up on this.
    • afavour 9 minutes ago
      CSS modules ought to make it possible. But it’s more or less impossible with regular CSS, you have no idea when a class/ID might be used.
  • derekhong 53 minutes ago
    [flagged]
  • FDEUp 40 minutes ago
    [dead]