css fluid type sizing based on viewport

Solutions on MaxInterview for css fluid type sizing based on viewport by the best coders in the world

showing results for - "css fluid type sizing based on viewport"
Giulio
09 Oct 2016
1/* NOTE: The [brackets] are not included in the syntax. 
2BUT, the 'px' denomination needs to be.
3If 'px' is not noted, it's just the numerical value. */
4
5.whateverClassBeingTargeted {
6  font-size: calc([minimum size px] + ([maximum size] - [minimum size]) * ((100vw - [minimum viewport widthpx]) / ([maximum viewport width] - [minimum viewport width])));
7}
8
9/* THERE IS ALSO 'CLAMP' BUT IT HASN'T BEEN CONSISTENT AMONG ALL BROWSERS */