Skip to content

Commit 44ff98c

Browse files
authored
Merge pull request #118 from unblu/bug/ecssunit-dvh-missing
Bug: ECSSUnit dvh/dvw missing
2 parents 187a28b + 577305f commit 44ff98c

File tree

1 file changed

+82
-0
lines changed

1 file changed

+82
-0
lines changed

ph-css/src/main/java/com/helger/css/ECSSUnit.java

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,10 @@ public enum ECSSUnit implements IHasName
8888
VMIN ("vmin", ECSSMetaUnit.VIEWPORT_RELATIVE_LENGTH),
8989
/** Equal to the larger of 'vw' or 'vh'. */
9090
VMAX ("vmax", ECSSMetaUnit.VIEWPORT_RELATIVE_LENGTH),
91+
/** Equal to 1% of the width of the dynamic viewport. */
92+
DVW ("dvw", ECSSMetaUnit.VIEWPORT_RELATIVE_LENGTH),
93+
/** Equal to 1% of the height of the dynamic viewport. */
94+
DVH ("dvh", ECSSMetaUnit.VIEWPORT_RELATIVE_LENGTH),
9195

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

573+
/**
574+
* @param nValue
575+
* value to format
576+
* @return <code>value + "dvw"</code>
577+
* @since 8.1.1
578+
*/
579+
@NonNull
580+
@Nonempty
581+
public static String dvw (final int nValue)
582+
{
583+
return DVW.format (nValue);
584+
}
585+
586+
/**
587+
* @param dValue
588+
* value to format
589+
* @return <code>value + "dvw"</code>
590+
* @since 8.1.1
591+
*/
592+
@NonNull
593+
@Nonempty
594+
public static String dvw (final double dValue)
595+
{
596+
return DVW.format (dValue);
597+
}
598+
599+
/**
600+
* @param aValue
601+
* Value to format. May not be <code>null</code>.
602+
* @return <code>value + "dvw"</code>
603+
* @since 8.1.1
604+
*/
605+
@NonNull
606+
@Nonempty
607+
public static String dvw (@NonNull final BigDecimal aValue)
608+
{
609+
return DVW.format (aValue);
610+
}
611+
612+
/**
613+
* @param nValue
614+
* value to format
615+
* @return <code>value + "dvh"</code>
616+
* @since 8.1.1
617+
*/
618+
@NonNull
619+
@Nonempty
620+
public static String dvh (final int nValue)
621+
{
622+
return DVH.format (nValue);
623+
}
624+
625+
/**
626+
* @param dValue
627+
* value to format
628+
* @return <code>value + "dvh"</code>
629+
* @since 8.1.1
630+
*/
631+
@NonNull
632+
@Nonempty
633+
public static String dvh (final double dValue)
634+
{
635+
return DVH.format (dValue);
636+
}
637+
638+
/**
639+
* @param aValue
640+
* Value to format. May not be <code>null</code>.
641+
* @return <code>value + "dvh"</code>
642+
* @since 8.1.1
643+
*/
644+
@NonNull
645+
@Nonempty
646+
public static String dvh (@NonNull final BigDecimal aValue)
647+
{
648+
return DVH.format (aValue);
649+
}
650+
569651
/**
570652
* @param nValue
571653
* value to format

0 commit comments

Comments
 (0)