mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 03:25:12 +01:00
Produce a mapping of aliases to resolved colors
This commit is contained in:
parent
a6b6fef6d2
commit
0b241db058
@ -153,8 +153,13 @@ module.exports = (opts = {}) => {
|
||||
if (opts.compiledVariables){
|
||||
populateMapWithDerivedVariables(opts.compiledVariables, cssFileLocation);
|
||||
}
|
||||
// Publish both the base-variables and derived-variables to the other postcss-plugins
|
||||
const combinedMap = new Map([...baseVariables, ...resolvedMap]);
|
||||
// Also produce a mapping from alias to completely resolved color
|
||||
const resolvedAliasMap = new Map();
|
||||
aliasMap.forEach((value, key) => {
|
||||
resolvedAliasMap.set(key, resolvedMap.get(value));
|
||||
});
|
||||
// Publish the base-variables, derived-variables and resolved aliases to the other postcss-plugins
|
||||
const combinedMap = new Map([...baseVariables, ...resolvedMap, ...resolvedAliasMap]);
|
||||
result.messages.push({
|
||||
type: "resolved-variable-map",
|
||||
plugin: "postcss-compile-variables",
|
||||
|
Loading…
Reference in New Issue
Block a user