Calc() CSS Function to Change Hero Height

CSS IconCSS Tricks continues to be my favorite and go-to for all things CSS and front-end. Years ago, I discovered the power of using CSS’s calc() — unlocking the ability to mix percentages in pixels in the heyday of the CSS box model. I’ve since converted my current dev team, opening their eyes to the power of using calc().

The post linked below uses our buddy, calc() as an ingenious means to have fluid sizing of fonts. I’ve been doing this in part lately with viewport width, but this is a more elegant, but more complicated solution.

Source: CSS-Tricks – Fun Tip: Use calc() to Change the Height of a Hero Component

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.