Add support for the aspect-ratio CSS property. It specifies a desired aspect ratio for a display element.
auto
ratios in the form of 1/1, 16/9, 2, or 0.5
fallback values with auto and a ratio; e.g., auto 1/1 or 1/1 auto
one of inherit, initial, revert, revert-layer, unset
I think we can support this by adding an aspectRatio function to Clay.Geometry. Its argument could be a Rational for ratios, a tuple of (auto, ratio) or (ratio, auto), or the usual set of auto, inherit, ... values. Its argument type could be a type class like AspectRatioValue, of which Rational and Value could be made instances. E.g.,
aspectRatio auto
aspectRatio initial
aspectRatio (16%9)
aspectRatio (16%9, auto)
This issue is mainly stating my intention to implement support for aspect-ratio and to track any work related to it, rather than a feature request for someone else to implement.
Add support for the
aspect-ratio
CSS property. It specifies a desired aspect ratio for a display element.auto
1/1
,16/9
,2
, or0.5
auto
and a ratio; e.g.,auto 1/1
or1/1 auto
inherit
,initial
,revert
,revert-layer
,unset
I think we can support this by adding an
aspectRatio
function toClay.Geometry
. Its argument could be aRational
for ratios, a tuple of (auto
, ratio) or (ratio,auto
), or the usual set ofauto
,inherit
, ... values. Its argument type could be a type class likeAspectRatioValue
, of whichRational
andValue
could be made instances. E.g.,This issue is mainly stating my intention to implement support for
aspect-ratio
and to track any work related to it, rather than a feature request for someone else to implement.Note that this is distinct from the
aspect-ratio
media feature, which is already supported withClay.Media.aspectRatio
.