Skip to content

[css-values] Clarify that <percentage>s never resolve to <number>s in calc() #2789

Closed

Description

@SebastianZ

In issue #1463 it was resolved that <percentage> values never resolve to <number> values when used in calc(). Though the change made to the spec. isn't as clear as @tabatkins' description in the issue.
There it was said that the problem is that calc(1% * 1%) would be valid for opacity (as percentages resolve to <number>s, while it is invalid in width (as it would resolve to length²).

Furthermore, it missed that the definition of percentage values still allows combinations of <number> and <percentage> values in calc() saying

In cases where a <percentage> can represent the same quantity as a dimension or number in the same component value position, and can therefore be combined with them in a calc() expression…

This sentence should be rephrased, so that it's clear that <percentage> + <number> combinations are invalid within calc().

Sebastian

Activity

  1. SebastianZ commented on Jun 15, 2018

    @SebastianZ
    ContributorAuthor

    Btw., when you're at it, you should replace "Altho" by "Although" to be more formal and understandable.

    Sebastian

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions