Module

calculateHeightPercentageByAspectRatio

Convert aspect ratio to height percentage for use in the container
Parameters:
Name Type Description
aspectRatio The floating number of aspect ratio of format (W/H). e.g. 12/8
fallbackPercentage (optional) in format of "XX%". If invalid, use "100%"

View Source style/calculateHeightPercentageByAspectRatio.js, line 8

height in format of "XX%", which is percentage of height to width (H/W)