Skip to content

ie-css: implement percentage resolution and calc() in style computation #90

@thomasnemer

Description

@thomasnemer

Goal

Percentage values and calc() expressions are parsed but not resolved.

Current state

  • CssValue::Percentage(v) passes through to layout unchanged
  • calc() is not parsed at all
  • Layout receives percentage values but doesn't resolve them against containing block

Implementation needed

  • Percentage resolution in resolve.rs: width % of containing block, font-size % of parent, etc.
  • calc() parsing: basic arithmetic (add, sub, mul, div) with mixed units
  • calc() resolution at compute time

Impact

Many CSS layouts use percentages (width: 50%, margin: 0 auto with %). calc() is increasingly common.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions