develwithoutacause,

calc can't add or subtract with a unitless 0. You must include units.

/* Doesn't work. */  
height: calc(0 + 100px);

/* Works. */  
height: calc(0px + 100px);  

https://stackoverflow.com/a/55406181/3995712

I can kind of see the argument why here, but it's strange to me that multiplication works, just not addition or subtraction. Definitely a foot gun to watch out for. I wonder how many linters would suggest unitless 0 here?

  • All
  • Subscribed
  • Moderated
  • Favorites
  • til
  • DreamBathrooms
  • mdbf
  • ethstaker
  • magazineikmin
  • GTA5RPClips
  • rosin
  • thenastyranch
  • Youngstown
  • osvaldo12
  • slotface
  • khanakhh
  • kavyap
  • InstantRegret
  • Durango
  • provamag3
  • everett
  • cisconetworking
  • Leos
  • normalnudes
  • cubers
  • modclub
  • ngwrru68w68
  • tacticalgear
  • megavids
  • anitta
  • tester
  • JUstTest
  • lostlight
  • All magazines