Skip to content
PHP Ecosystem
Explore

PreserveAspectRatio

API reference › HTML SVG › Values › PreserveAspectRatio

enumUIAwesome\Html\Svg\Values\PreserveAspectRatio
Backed bystring
Sourcesrc/Values/PreserveAspectRatio.php

Represents literal string values for the SVG preserveAspectRatio attribute.

Provides the keyword and combined values used by the preserveAspectRatio attribute.

See also: Image::preserveAspectRatio(), Marker::preserveAspectRatio(), Pattern::preserveAspectRatio(), Svg::preserveAspectRatio().

CaseValueDescription
NONE'none'none - Does not force uniform scaling.
X_MAX_Y_MAX'xMaxYMax'xMaxYMax - Align the <min-x>+<width> of the element’s viewBox with the maximum X value of the viewport.
X_MAX_Y_MAX_MEET'xMaxYMax meet'xMaxYMax meet - Align the <min-x>+<width> of the element’s viewBox with the maximum X value of the viewport.
X_MAX_Y_MAX_SLICE'xMaxYMax slice'xMaxYMax slice - Align the <min-x>+<width> of the element’s viewBox with the maximum X value of the viewport.
X_MAX_Y_MID'xMaxYMid'xMaxYMid - Align the <min-x>+<width> of the element’s viewBox with the maximum X value of the viewport.
X_MAX_Y_MID_MEET'xMaxYMid meet'xMaxYMid meet - Align the <min-x>+<width> of the element’s viewBox with the maximum X value of the viewport.
X_MAX_Y_MID_SLICE'xMaxYMid slice'xMaxYMid slice - Align the <min-x>+<width> of the element’s viewBox with the maximum X value of the viewport.
X_MAX_Y_MIN'xMaxYMin'xMaxYMin - Align the <min-x>+<width> of the element’s viewBox with the maximum X value of the viewport.
X_MAX_Y_MIN_MEET'xMaxYMin meet'xMaxYMin meet - Align the <min-x>+<width> of the element’s viewBox with the maximum X value of the viewport.
X_MAX_Y_MIN_SLICE'xMaxYMin slice'xMaxYMin slice - Align the <min-x>+<width> of the element’s viewBox with the maximum X value of the viewport.
X_MID_Y_MAX'xMidYMax'xMidYMax - Align the midpoint X value of the element’s viewBox with the midpoint X value of the viewport.
X_MID_Y_MAX_MEET'xMidYMax meet'xMidYMax meet - Align the midpoint X value of the element’s viewBox with the midpoint X value of the viewport.
X_MID_Y_MAX_SLICE'xMidYMax slice'xMidYMax slice - Align the midpoint X value of the element’s viewBox with the midpoint X value of the viewport.
X_MID_Y_MID'xMidYMid'xMidYMid - Align the midpoint X value of the element’s viewBox with the midpoint X value of the viewport.
X_MID_Y_MID_MEET'xMidYMid meet'xMidYMid meet - Align the midpoint X value of the element’s viewBox with the midpoint X value of the viewport.
X_MID_Y_MID_SLICE'xMidYMid slice'xMidYMid slice - Align the midpoint X value of the element’s viewBox with the midpoint X value of the viewport.
X_MID_Y_MIN'xMidYMin'xMidYMin - Align the midpoint X value of the element’s viewBox with the midpoint X value of the viewport.
X_MID_Y_MIN_MEET'xMidYMin meet'xMidYMin meet - Align the midpoint X value of the element’s viewBox with the midpoint X value of the viewport.
X_MID_Y_MIN_SLICE'xMidYMin slice'xMidYMin slice - Align the midpoint X value of the element’s viewBox with the midpoint X value of the viewport.
X_MIN_Y_MAX'xMinYMax'xMinYMax - Align the <min-x> of the element’s viewBox with the smallest X value of the viewport.
X_MIN_Y_MAX_MEET'xMinYMax meet'xMinYMax meet - Align the <min-x> of the element’s viewBox with the smallest X value of the viewport.
X_MIN_Y_MAX_SLICE'xMinYMax slice'xMinYMax slice - Align the <min-x> of the element’s viewBox with the smallest X value of the viewport.
X_MIN_Y_MID'xMinYMid'xMinYMid - Align the <min-x> of the element’s viewBox with the smallest X value of the viewport.
X_MIN_Y_MID_MEET'xMinYMid meet'xMinYMid meet - Align the <min-x> of the element’s viewBox with the smallest X value of the viewport.
X_MIN_Y_MID_SLICE'xMinYMid slice'xMinYMid slice - Align the <min-x> of the element’s viewBox with the smallest X value of the viewport.
X_MIN_Y_MIN'xMinYMin'xMinYMin - Align the <min-x> of the element’s viewBox with the smallest X value of the viewport.
X_MIN_Y_MIN_MEET'xMinYMin meet'xMinYMin meet - Align the <min-x> of the element’s viewBox with the smallest X value of the viewport.
X_MIN_Y_MIN_SLICE'xMinYMin slice'xMinYMin slice - Align the <min-x> of the element’s viewBox with the smallest X value of the viewport.