Skip to content

Add CSS Values and Units Module Level 4 Mathematical Expressions #6207

@Schweinepriester

Description

@Schweinepriester

https://www.w3.org/TR/css-values-4/#math, specifically 10.3 up to including 10.7.

Stolen from https://bugs.chromium.org/p/chromium/issues/detail?id=1284199:

  1. 10.3. Stepped Value Functions: round(), mod(), and rem()
    https://drafts.csswg.org/css-values/#round-func

  2. 10.4. Trigonometric Functions: sin(), cos(), tan(), asin(), acos(), atan(), and atan2()
    https://drafts.csswg.org/css-values/#trig-funcs

  3. 10.5. Exponential Functions: pow(), sqrt(), hypot(), log(), exp()
    https://drafts.csswg.org/css-values/#exponent-funcs

  4. 10.6. Sign-Related Functions: abs(), sign()
    https://drafts.csswg.org/css-values/#sign-funcs

but also

10.7. Numeric Constants: e, pi
10.7.1. Degenerate Numeric Constants: infinity, -infinity, NaN

Safari 15.4 via https://webkit.org/blog/12445/new-webkit-features-in-safari-15-4/:

WebKit added support for calc() math functions including sincostanepiexplogatanacosasin, and atan2.

Chrome:

I think it's likely that they will come via MDN as some/most/all are mentioned on https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Functions#math_functions, but currently there don't seem to be support tables yet.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions