After years of developer frustration and questions on online forums, it’s finally happening: CSS is getting an if() function to apply styling when a condition is met. For the first time, developers can make logical decisions directly in stylesheets, without separate code blocks. This opens up whole new possibilities for web designers.

  • trolololol@lemmy.world
    link
    fedilink
    arrow-up
    15
    ·
    10 days ago

    What an abomination

    I’m just curious what kind of bad code is going to be around when this gets widespread.

    • python@lemmy.world
      link
      fedilink
      arrow-up
      3
      ·
      9 days ago

      No worries, we really bad web developers have all switched to React long ago 😎 So no CSS here, just Material-UI’s “sx” attribute plastered over every single component.