csspoo

Search

Tags

  • Animation 1
  • Hover 2

Feed

RSS2.0
  • 2019-11-24

    Negative variables

    Author

    Jens Törnell

    Comments

    Start a discussion

    It's not possible to use negative variables out of the box like this -var(--size); Instead you need to multiply the variable with -1.

    calc(var(--size) * -1);

    Demo

    Full page

    As you can see is it pulling the div to the left instead of pushing it to the right.

    Sources

    • https://github.com/css-modules/postcss-icss-values/issues/64#issuecomment-241285628
    • Modified by CSSPoo

    If you like this post, please share it! Tweet this!

  • Write for us
  • Contact us
  • About
  • License
Copyright © 2019

This page uses cookies for Google Analytics.