HTML & CSS EnhancementsLesson 28Free preview
Calc & Functions
This lesson is part of Intro to HTML & CSS · All levels
Summary
This lesson discusses modern CSS functions such as calc(), min(), max(), and clamp() that calculate values in declarations. With this function, you can mix different units and create responsive sizes without JavaScript. These functions save a lot of media query for size cases.
Key points
- Calculate values by mixing units, e.g.
- Min() and max() select the smallest or largest value of some candidates
- Clamp(min, ideal, max) limiting the ideal value within a certain range
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.