Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 82 additions & 0 deletions ph-css/src/main/java/com/helger/css/ECSSUnit.java
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ public enum ECSSUnit implements IHasName
VMIN ("vmin", ECSSMetaUnit.VIEWPORT_RELATIVE_LENGTH),
/** Equal to the larger of 'vw' or 'vh'. */
VMAX ("vmax", ECSSMetaUnit.VIEWPORT_RELATIVE_LENGTH),
/** Equal to 1% of the width of the dynamic viewport. */
DVW ("dvw", ECSSMetaUnit.VIEWPORT_RELATIVE_LENGTH),
/** Equal to 1% of the height of the dynamic viewport. */
DVH ("dvh", ECSSMetaUnit.VIEWPORT_RELATIVE_LENGTH),

/** Represents a percentage of the width of the query container. */
CQW ("cqw", ECSSMetaUnit.CONTAINER_RELATIVE_LENGTH),
Expand Down Expand Up @@ -566,6 +570,84 @@ public static String vmax (@NonNull final BigDecimal aValue)
return VMAX.format (aValue);
}

/**
* @param nValue
* value to format
* @return <code>value + "dvw"</code>
* @since 8.1.1
*/
@NonNull
@Nonempty
public static String dvw (final int nValue)
{
return DVW.format (nValue);
}

/**
* @param dValue
* value to format
* @return <code>value + "dvw"</code>
* @since 8.1.1
*/
@NonNull
@Nonempty
public static String dvw (final double dValue)
{
return DVW.format (dValue);
}

/**
* @param aValue
* Value to format. May not be <code>null</code>.
* @return <code>value + "dvw"</code>
* @since 8.1.1
*/
@NonNull
@Nonempty
public static String dvw (@NonNull final BigDecimal aValue)
{
return DVW.format (aValue);
}

/**
* @param nValue
* value to format
* @return <code>value + "dvh"</code>
* @since 8.1.1
*/
@NonNull
@Nonempty
public static String dvh (final int nValue)
{
return DVH.format (nValue);
}

/**
* @param dValue
* value to format
* @return <code>value + "dvh"</code>
* @since 8.1.1
*/
@NonNull
@Nonempty
public static String dvh (final double dValue)
{
return DVH.format (dValue);
}

/**
* @param aValue
* Value to format. May not be <code>null</code>.
* @return <code>value + "dvh"</code>
* @since 8.1.1
*/
@NonNull
@Nonempty
public static String dvh (@NonNull final BigDecimal aValue)
{
return DVH.format (aValue);
}

/**
* @param nValue
* value to format
Expand Down
Loading