shila-css

2.7.1 #tools.ratio.shila-intrinsic-ratio shila-intrinsic-ratio

@mixin shila-intrinsic-ratio($ratio, $fit: null, $selector: "> :first-child")

Sets a fixed ratio for a child element. Supports different ways to fit the content. The default is to scale both width and height so all content is visible, but might be distorted. The optional $fit parameter can be used to scale the content in only one dimension, possible overflow is hidden.

Parameters:
  • $ratio
    Ratio
  • $fit
    (Optional.) String value of either width or height.
  • $selector
    (Optional.) Child element CSS selector.
Source: partials/tools/_tools.ratio.scss, line 10