Closed
Description
MDN URL
https://developer.mozilla.org/en-US/docs/Web/CSS/calc
What specific section or headline is this issue about?
The first paragraph
What information was incorrect, unhelpful, or incomplete?
The statement:
It can be used anywhere a
<length>
,<frequency>
,<angle>
,<time>
,<percentage>
,<number>
, or<integer>
is allowed.
There is a caveat in which calc()
cannot be used as a number. If we take a look at the syntax for percentage, we'll see that it states:
The
<percentage>
data type consists of a<number>
followed by the percentage sign (%).
If you were to try to substitute <number>
with a calc expression, such as:
.class {
background-position: calc(100 / 200 * 3)%;
}
It would not be valid.
What did you expect to see?
A mention of this caveat, and likely the removal of the word "anywhere".
Do you have any supporting links, references, or citations?
https://developer.mozilla.org/en-US/docs/Web/CSS/percentage#syntax
Do you have anything more you want to share?
No response
MDN metadata
Page report details
- Folder:
en-us/web/css/calc
- MDN URL: https://developer.mozilla.org/en-US/docs/Web/CSS/calc
- GitHub URL: https://github.com/mdn/content/blob/main/files/en-us/web/css/calc/index.md
- Last commit: 6be1b95
- Document last modified: 2022-09-26T22:47:43.000Z
Metadata
Metadata
Assignees
Labels
No labels