Skip to content

New feature: calc(<dimension> / <dimension>) #4196

Description

@LeaVerou

Specification

https://drafts.csswg.org/css-values-4/#calc-func
https://drafts.csswg.org/css-values-4/#calc-type-checking

Description

Division between compatible <dimension> values is a relatively recent feature, distinct from general calc() arithmetic and as discussed on Matrix needs a separate web-feature id.

This replaced the old atan2() hack by @JaneOri.

BCD keys:
css.types.calc.typed_division_produces_unitless_number
css.types.sign.typed_division_produces_unitless_number

Suggested id:

  • css-dimension-division

Documentation

https://developer.mozilla.org/en-US/docs/Web/CSS/Guides/Values_and_units/Using_typed_arithmetic#division

Browser support

Per https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Values/calc#browser_compatibility

  • Chrome/Edge 140+
  • Safari 26+
  • Opera 124
  • No Firefox

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature definitionCreating or defining new features or groups of features.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions