Skip to main content

Module constants

Module constants 

Source
Expand description

Port of src/syntax/constants.ts.

Constants§

COLORS_FUNC
COLORS_NAMES
COLORS_NAMES: name to color
COLOR_FUNC_COLOR_SPACE
COMBINATORS
CONTAINER_FUNC
D50
DEPRECATED_SYSTEM_COLORS
deprecatedSystemColors (lowercase)
FUNC_LIKE
GRID_TEMPLATE_FUNC
IMAGE_FUNC
MATH_FUNCS
MEDIA_TYPES
PAGE_MARGIN_BOX_TYPE
PSEUDO_ELEMENTS
SUPPORT_FUNC
SYSTEM_COLORS
systemColors (lowercase)
TIMELINE_FUNC
TIMING_FUNC
TOKENS_FUNC_DEF_MAP
tokensfuncDefMap: function definition token type -> function token type
TRANSFORM_FUNCTIONS
URL_FUNC
WHEN_ELSE_FUNC
WILD_CARD_FUNCS
anglePrecision
colorDistancePrecision
colorPrecision
e
Math.pow(6, 3) / Math.pow(29, 3)
epsilon
k
Math.pow(29, 3) / Math.pow(3, 3)
mFGT
mFLT

Functions§

color_name_to_hex
COLORS_NAMES[name]
color_range
colorRange: [min, max] of the components, by color space
hex_to_color_name
NAMES_COLORS[hex]: color to name (the last name of a color wins, like the typescript reduce)
is_function_def_type
true if the token type is a function definition (name()
is_function_type
true if the token type is a function (tokensfuncSet.has(type))
non_standard_colors
nonStandardColors
reg_match_linear_gradient
/^-((webkit)|o|moz)(-repeating)?-linear-gradient$/i
reg_match_radial_gradient
/^-((webkit)|o|moz)(-repeating)?-radial-gradient$/i
tokens_func_def_map
tokensfuncDefMap.get(type)
tokens_map
tokensMap
trim_token_space
trimTokenSpace
url_token_matcher
/^(["']?)[a-zA-Z0-9_/.-][a-zA-Z0-9_/:.#?-]+(\1)$/
validation_units
the units of the validation data, in their canonical spelling (Hz, Q, dB)