Constants
COMPOSE
export const COMPOSE = {
DEEP: 'DEEP',
SOFT: 'SOFT',
SWAP: 'SWAP',
}
Supported theme composition modes. Two component themes with lower (L
),
and higher (H
) priorities can be merged in the following ways
-
.DEEP
- In deep composition mode all classes fromH
are applied with higher specifity, on top of all classes fromL
, which are applied with lower specifity. Thus, in case of conflicting rules, themeH
overridesL
, but otherwise rules fromL
are used as defaults. It is the default composition mode. -
.SOFT
- In soft composition mode all classes fromH
are applied, while classes from themeL
are applied only if they are absent in themeH
. Thus, any classes defined inH
completely override corresponding classes fromL
.` -
.SWAP
- In swap mode only classes from themeH
are applied, thus themeH
completely overridesL
.
PRIORITY
export const PRIORITY = {
ADHOC_CONTEXT_DEFAULT: 'ADHOC_CONTEXT_DEFAULT',
ADHOC_DEFAULT_CONTEXT: 'ADHOC_DEFAULT_CONTEXT',
}
Supported theme priority models.
-
.ADHOC_CONTEXT_DEFAULT
- In this mode ad hoc theme has the highest priority, followed by the context, then by the default theme. This is the default prioty model. -
.ADHOC_DEFAULT_CONTEXT
- In this mode ad hoc theme has the highest priority, followed by the default theme, then by the context theme.