Beehaw
  • Communities
  • Create Post
  • search
    Search
  • Login
  • Sign Up
pcouy ( pcouy@lemmy.pierre-couy.fr )  to Programming@programming.dev ·
edit-2
2 years ago

Goodbye SASS, welcome back native CSS

medium.com

external-link
message-square
12
link
fedilink
53
external-link

Goodbye SASS, welcome back native CSS

medium.com

pcouy ( pcouy@lemmy.pierre-couy.fr )  to Programming@programming.dev ·
edit-2
2 years ago
message-square
12
link
fedilink
Goodbye SASS 👋, welcome back native CSS
medium.com
external-link
Sass has established itself as a powerful preprocessor installed locally, forming the backbone of my projects for over a decade. It enabled…
alert-triangle
You must log in or # to comment.
  • unmagical ( unmagical@lemmy.ml ) 
    link
    fedilink
    arrow-up
    12
    ·
    2 years ago

    I, uh, hate that radius calculation. Why does the radius need to be reactive? What do you stand to gain over just setting to like 3 or 4px and moving on with your life?

    • pcouy ( pcouy@lemmy.pierre-couy.fr ) OP
      link
      fedilink
      arrow-up
      2
      ·
      2 years ago

      I’m not sure how this relates to the shared post. I’m just searched the article for “radius” and only found one example where a variable is defined then used later. Were you talking about this ? Or can you clarify what “radius calculation” you hate ?

      • lucas ( lucas@startrek.website ) 
        link
        fedilink
        English
        arrow-up
        4
        ·
        edit-2
        2 years ago

        They’re referring (I believe) to the screenshot right at the top of the article, which includes this absurd calculation:

        border-radius: max (0px, min(8px, calc( (100vw - 4px - 100%) * 9999)) );
        

        My guess (hope!) is that this is not ‘serious’ code, but padding for the sake of a screenshot to demonstrate that it’s possible to use each of these different features (not that you should!).

        • pcouy ( pcouy@lemmy.pierre-couy.fr ) OP
          link
          fedilink
          arrow-up
          1
          ·
          2 years ago

          border-radius: max(0px, min(8px, calc( (100vw - 4px - 100%) * 9999)) );

          Oh I missed this. I think it’s only here to showcase doing math between different units, which is really nice in my opinion. I’m thinking about a few instances where I had to resort to dirty JS hacks just because CSS did not support this at the time

  • frezik ( frezik@midwest.social ) 
    link
    fedilink
    arrow-up
    8
    ·
    2 years ago

    I like that css now has variables, but why that syntax?

    • Gamma ( GammaGames@beehaw.org ) 
      link
      fedilink
      English
      arrow-up
      5
      ·
      2 years ago

      I think to make sure they don’t clash with existing identifiers

      • frezik ( frezik@midwest.social ) 
        link
        fedilink
        arrow-up
        23
        ·
        2 years ago

        I could understand declaring with --foo, but then referencing should be either var(foo) or just --foo, not the combination var(--foo). I don’t get why the grammar has to work that way.

    • Gamma ( GammaGames@beehaw.org ) 
      link
      fedilink
      English
      arrow-up
      1
      ·
      2 years ago

      deleted by creator

  • Paradox ( Paradox@lemdro.id ) 
    link
    fedilink
    English
    arrow-up
    6
    ·
    2 years ago

    I still reach for sass for a lot of things, but now you don’t have to, which is really nice

  • Cratermaker ( Cratermaker@discuss.tchncs.de ) 
    link
    fedilink
    arrow-up
    6
    ·
    2 years ago

    Good riddance, I say. Web dev is infested with layers upon layers of tools that attempt to abstract what is already fairly simple and straightforward to work with. We’re beyond the days of needing to build buttons out of small image fragments, and JS is (slowly) becoming more livable in its raw form. I welcome anything that keeps the toolchain as simple as possible.

  • katy ✨ ( cupcakezealot@lemmy.blahaj.zone ) 
    link
    fedilink
    arrow-up
    4
    ·
    2 years ago

    still can’t do mixins and extends though. :(

  • joachim ( joachim@drupal.community ) 
    link
    fedilink
    arrow-up
    0
    ·
    2 years ago

    @pcouy The URL is broken.

    • pcouy ( pcouy@lemmy.pierre-couy.fr ) OP
      link
      fedilink
      arrow-up
      2
      ·
      2 years ago

      It seems to be working for me, it’s weird. I’ve updated the post with the same URL anyway, and you can try https://scribe.bus-hit.me/@karstenbiedermann/goodbye-sass-welcome-back-native-css-b3beb096d2b4 if that still does not work

Programming@programming.dev

programming@programming.dev

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !programming@programming.dev

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person’s post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you’re posting long videos try to add in some form of tldr for those who don’t want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 124 users / day
  • 413 users / week
  • 1.67K users / month
  • 4.15K users / 6 months
  • 449 local subscribers
  • 28.7K subscribers
  • 2.93K Posts
  • 22.9K Comments
  • Modlog
  • mods:
  • snowe ( snowe@programming.dev ) 
  • Ategon ( Ategon@programming.dev ) 
  • UlrikHD ( UlrikHD@programming.dev ) 
  • bugsmith ( bugsmith@programming.dev ) 
  • Spyro ( Spyro@programming.dev ) 
  • BE: 0.19.15
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code