• ThunderComplex@lemmy.today
    link
    fedilink
    arrow-up
    20
    ·
    2 months ago

    fun fact: This isn’t any one specific CSS framework’s doing but rather part of how JS UI libraries handle scoped CSS. When you have for example two components that have similar CSS, like one component sets button to color green, another component sets button to blue, then the compiler does this kinda thing because “real” CSS doesn’t support scoping.

    So in the above example you’d get button class abcd and button class bcde.

    • FooBarrington
      link
      fedilink
      arrow-up
      3
      ·
      edit-2
      2 months ago

      How *some JS UI libraries handle scoped CSS. Vue for example uses data- attributes instead.