Skip to content

Support expressions within functions like max #1438

Description

@JakeQZ

#389 and #1437 are closed because they are too global.

Expressions as length values are not part of any standard, e.g.

.left {
  width: (10% + 0.5vw);
}

... is not valid and must by wrapped in a calc() function.

But when used within certain CSS functions, like max, are valid, e.g.

.left {
  width: min(1vw, 10% + 0.5vw);
}

Note that braces are not even required in the second argument.

Some checking-up on the standards and which CSS functions allow expressions is a pre-requisite to move this forward* - e.g. it doesn't make sense for functions like gradient(), but maybe is allowed in the arguments.

*unless anyone knows this off-by-heart

I think it's possible to incorporate the Expression class (in the abovementioned PRs), but rather as a descendant of Size...

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions