Package com.oorian.css.units
Class Vmin
java.lang.Object
com.oorian.css.units.Units
com.oorian.css.units.Vmin
CSS vmin (viewport minimum) unit value.
The vmin unit is equal to 1% of the smaller dimension of the viewport (either width or height). For example, if the viewport is 1200px wide and 900px tall, 1vmin equals 9px (1% of 900). This unit is useful for maintaining proportions regardless of viewport orientation.
Usage:
Units size = new Vmin(10);
element.setFontSize(new Vmin(5));
element.setPadding(new Vmin(2));
- Since:
- 2016
- Version:
- 1.0
- Author:
- Marvin P. Warble Jr.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the CSS string representation of this vmin value.
-
Constructor Details
-
Vmin
public Vmin(float value) Constructs a Vmin unit with the specified value.- Parameters:
value- the vmin value (percentage of smaller viewport dimension)
-
-
Method Details
-
sizeToString
Returns the CSS string representation of this vmin value.- Specified by:
sizeToStringin classUnits- Returns:
- the CSS value string (e.g., "10vmin")
-