Content comes in all shapes, sizes and lengths, creating layout challenges. Silva's ratio module constrains content in a predetermined aspect ratio, which will be maintained responsively. The amount of ratios and their values are entirely configurable.
Using utility classes, a layout container can be assigned a ratio. A ratio is a predetermined balance between the element's width and height that will be maintained even when the element is resized.
Ratio containers can be combined horizontally or vertically.
The ratio of an elements can be set per breakpoint.
The default behavior of ratio containers is that they have an initial height that respects the given ratio, yet the height grows if the height of the inner content is larger than the initial height. To enforce a ratio no matter the inner content, a ratio container can be set to Fit mode. In fit mode, excess height taken up by the inner content is simply cut off.
Ratio cells in fit mode allow for a cover effect of specific content types.
Ratios can also be applied to layout rows. This panel has a ratio applied both to the layout row and its inner contents.