| CssUnit {Microsoft.VisualBasic.MIME.Html.CSS} | .NET clr documentation |
Represents the possible units of the CSS lengths
http://www.w3.org/TR/CSS21/syndata.html#length-units
# namespace Microsoft.VisualBasic.MIME.Html.CSS
export class CssUnit extends Enum {
# Unknown
[@desc ""]
None: CssUnit = 0;
# em: the 'font-size' of the relevant font
[@desc "em"]
Ems: CssUnit = 1;
# ex: the 'x-height' of the relevant font
[@desc "ex"]
Ex: CssUnit = 2;
# px: pixel units — 1px is equal to 0.75pt.
[@desc "px"]
Pixels: CssUnit = 3;
# in: inches — 1in is equal to 2.54cm.
[@desc "in"]
Inches: CssUnit = 4;
# cm: centimeters
[@desc "cm"]
Centimeters: CssUnit = 5;
# mm: millimeters
[@desc "mm"]
Milimeters: CssUnit = 6;
# pt: points — the points used by CSS are equal to 1/72nd of 1in.
[@desc "pt"]
Points: CssUnit = 7;
# pc: picas — 1pc is equal to 12pt.
[@desc "pc"]
Picas: CssUnit = 8;
# The format of a percentage value (denoted by <percentage> in this specification) is a <number> immediately followed by '%'.
#
# Percentage values are always relative to another value, for example a length. Each property that allows percentages also defines the value to which the percentage refers. The value may be that of another property for the same element, a property for an ancestor element, or a value of the formatting context (e.g., the width of a containing block). When a percentage value is set for a property of the root element and the percentage is defined as referring to the inherited value of some property, the resultant value is the percentage times the initial value of that property.
#
# Since child elements (generally) inherit the computed values of their parent, in the following example, the children of the P element will inherit a value of 12px for 'line-height', not the percentage value (120%):
#
#
# p { font-size: 10px }
# p { line-height: 120% } /* 120% of 'font-size' */
[@desc "%"]
Percent: CssUnit = 9;
}
None: CssUnitEms: CssUnitEx: CssUnitPixels: CssUnitInches: CssUnitCentimeters: CssUnitMilimeters: CssUnitPoints: CssUnitPicas: CssUnitPercent: CssUnit