Skip to content

Commit

Permalink
Merge branch 'main' into release-12-07-2024.staging
Browse files Browse the repository at this point in the history
  • Loading branch information
kof authored Jul 12, 2024
2 parents b02efef + 429c406 commit e5f51eb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2628,9 +2628,9 @@ describe("Styles", () => {
instanceId: expect.any(String),
values: [
"uu1p3Xdvlq_AZOxnzDvAv",
"uumXb7vHOnzTr-4SIW-wJ",
"uuBw1PRC_uE8RhTmwxaH8",
"uuORexg4BOrRXBJZgB80_",
"uumXb7vHOnzTr-4SIW-wJ",
],
},
]);
Expand Down
18 changes: 9 additions & 9 deletions apps/builder/app/shared/copy-paste/plugin-webflow/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ const mergeComboStyles = (styles: Array<WfStyle>) => {
mergedStyle.styleLess += style.styleLess;
mergedStyle.name += "." + style.name;
for (const key in style.variants) {
if (key in style.variants === false) {
if (key in mergedStyle.variants === false) {
mergedStyle.variants[key] = { styleLess: "" };
}
mergedStyle.variants[key].styleLess += style.variants[key];
Expand Down Expand Up @@ -531,6 +531,14 @@ export const addStyles = async ({
}
});

addNodeTokenStyles({
styleSourceId: await generateStyleSourceId(wfStyle.name),
name: wfStyle.name,
variants,
instanceId,
fragment,
});

// Produce all possible combinatios of combo classes so we can check later if they alredy exist.
// This is needed to achieve the same end-result as with combo-classes in webflow.
const allComboClasses = comboStylesMerge.mergedClasses.flatMap((name1) =>
Expand All @@ -546,13 +554,5 @@ export const addStyles = async ({
addStyleSource(wsStyleSourceId, instanceId, fragment);
}
}

addNodeTokenStyles({
styleSourceId: await generateStyleSourceId(wfStyle.name),
name: wfStyle.name,
variants,
instanceId,
fragment,
});
}
};

0 comments on commit e5f51eb

Please sign in to comment.