Pricing Blog

Why spacing variables, aren't visible in viewport width/height?

  • uunicode-1438067882063040612

    unicodes

    3 days ago

    Should I use a different variable?
    1438067882310373508-Screenshot_2025-11-12_at_09.26.15.png
  • andreasmoller-1438070082168164413

    Andreas Møller

    3 days ago

    That is not supported by CSS.

    Designing for specific screen sizes is also generally an anti pattern
    🙏1
  • uunicode-1438070432275369984

    unicodes

    3 days ago

    Thank you Andreas!
  • uunicode-1438083600619929683

    unicodes

    3 days ago

    @Andreas Møller , when I used to code, I worked with SCSS, which allowed me to use variables for media queries. Nordcraft relies on vanilla CSS, right?
  • whitep4nth3r-1438094941711499275

    salma

    3 days ago

    yes correct, so annoying you can't use CSS vars in media queries, I've always hated that
    👍1
  • andreasmoller-1438113636450041956

    Andreas Møller

    3 days ago

    I actually kinda like that you cant 🙂
  • uunicode-1438117512742043828

    unicodes

    3 days ago

    Why?
  • andreasmoller-1438122975537659914

    Andreas Møller

    3 days ago

    Because people immidiately make a --mobile, --table and --desktop variable.
    https://viewports.fyi/
    🙏1
  • whitep4nth3r-1438126284126289971

    salma

    3 days ago

    Yeah I guess I used to want to create vars for media queries when we needed media queries, before we had responsive units and things like clamp()

    I can't live without clamp()
  • uunicode-1438130724136812705

    unicodes

    3 days ago

    Like clamp (14px, 10vw, 20px) 🤯 and you solve the issue 😅 .
  • whitep4nth3r-1438131512657576017

    salma

    3 days ago

    yep