Merge pull request #730 from smartxworks/bowen/css

fix(runtime): increase priority of style trait
This commit is contained in:
tanbowensg 2024-07-19 10:21:52 +08:00 committed by GitHub
commit b55df8d29f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -31,7 +31,7 @@ export default implementRuntimeTrait({
}
const cssPropertiesStr = convertCssObjToText(cssProperties || {});
// add a ';' between css texts, in case user forgets to add ';' in the end
result[styleSlot] = `&&& {${result[styleSlot]};${style};${cssPropertiesStr}}`;
result[styleSlot] = `.App &&& {${result[styleSlot]};${style};${cssPropertiesStr}}`;
return result;
}, {} as Record<string, string>);
return {