stylelint icon indicating copy to clipboard operation
stylelint copied to clipboard

`function-calc-no-unspaced-operator` should support newer calc functions

Open Mouvedia opened this issue 1 year ago • 2 comments

What is the problem you're trying to solve?

fix the false negatives for round and other calc-sum functions by broadening the meaning of calc to calc-sum

It doesn't validate any of the newer math functions.

compare https://www.w3.org/TR/css-values-4/#calc-syntax and https://www.w3.org/TR/css-values-3/#calc-syntax

What solution would you like to see?

I already have it working on a local branch for a subset of these.

  • [x] abs
  • [x] acos
  • [x] asin
  • [x] atan
  • [x] calc
  • [x] cos
  • [x] exp
  • [x] sign
  • [x] sin
  • [x] sqrt
  • [x] tan
  • [x] min
  • [x] max
  • [x] hypot
  • [x] clamp
  • [x] round
  • [x] mod
  • [x] rem
  • [x] atan2
  • [x] pow
  • [x] log

Mouvedia avatar Apr 16 '24 16:04 Mouvedia

@Mouvedia If this issue is incomplete, feel free to reopen. 🙏🏼

ybiquitous avatar Apr 18 '24 09:04 ybiquitous

@Mouvedia If this issue is incomplete, feel free to reopen. 🙏🏼

I did a partial quick fix. A follow-up PR will be needed to fix the last 10 functions. I added skipped tests to pave the way.

Mouvedia avatar Apr 18 '24 10:04 Mouvedia