Skip to content

Commit ea3baf8

Browse files
committed
🎨: handle text props directly within the spec
Previously, we would perform the normalization of text props at the very latest stage of synthesization, thereby loosing the overriding precedence of style properties for text properties.
1 parent 45421f5 commit ea3baf8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lively.morphic/components/policy.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1242,6 +1242,8 @@ export class StylePolicy {
12421242
parentSpec,
12431243
nextLevelSpec);
12441244

1245+
subSpec = handleTextProps({ ...subSpec });
1246+
12451247
for (let prop in subSpec) {
12461248
if (!subSpec[prop]?.isDefaultValue) synthesized[prop] = subSpec[prop];
12471249
}
@@ -1250,7 +1252,7 @@ export class StylePolicy {
12501252
delete synthesized.master;
12511253
delete synthesized.name;
12521254

1253-
return handleTextProps(synthesized);
1255+
return synthesized;
12541256
}
12551257

12561258
/**

0 commit comments

Comments
 (0)