Skip to content

[css-values] Should trigonometric functions work outside of calc? #7265

@Antonio-Laguna

Description

@Antonio-Laguna

Hey there!

I've been reading the spec for trigonometric functions to implement them on PostCSS Preset Env.

From reading the spec it's not clear that functions shouldn't work only on calc(). pi and e for example have a special note:

Note: These keywords are only usable within a calculation, such as calc(pow(e, pi) - pi), or min(pi, 5, e). If used outside of a calculation, they’re treated like any other keyword: animation-name: pi; refers to an animation named "pi"; line-height: e; is invalid (not similar to line-height: 2.7, but line-height: calc(e); is).

Webkit's implementation only allows to use inverse trigonometric outside of calc since they resolve to deg however, even if odd, should it be possible to do line-height: sin(45deg) given that it resolves to .707?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Closed as Question AnsweredUsed when the issue is more of a question than a problem, and it's been answered.css-values-4Current Work

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions