CSS Typed Arithmetic | CSS-Tricks
Briefly

CSS Typed Arithmetic | CSS-Tricks
"CSS typed arithmetic is genuinely exciting! It opens the door to new kinds of layout composition and animation logic we could only hack before. The first time I published something that leaned on typed arithmetic was in this animation: But before we dive into what is happening in there, let's pause and get clear on what typed arithmetic actually is and why it matters for CSS. Browser Support: The CSS feature discussed in this article,"
"typed arithmetic, is on the cutting edge. As of the time of writing, browser support is very limited and experimental. To ensure all readers can understand the concepts, the examples throughout this article are accompanied by videos and images, demonstrating the results for those whose browsers do not yet support this functionality. Please check resources like MDN or Can I Use for the latest support status."
Typed arithmetic adds unit-aware calculations to CSS by associating values with data-types that define the unit space a value occupies. Each CSS value belongs to a specific data-type and each property or function accepts only the expected type(s). Many numeric types like <percentage>, <frequency>, and <resolution> are calculable, while non-calculable types such as <color>, <string>, and <image> cannot participate in mathematical operations. Browser support for typed arithmetic is currently limited and experimental, so examples are often accompanied by videos and images to demonstrate results for environments without native support. Consult MDN or Can I Use for current support status.
Read at CSS-Tricks
Unable to calculate read time
[
|
]