I encountered a problem when developing SAP UI5:
In the XML view, I assigned a CSS class to the Button control:
sapUiSmallMarginEnd
It is expected that at runtime, the CSS class can produce a margin effect of 1 rem:
The picture above is an example from the SAP UI5 official website.
However, my example failed to run. The HTML native code rendered by my button control did not show this CSS class, and the margin effect I expected was not achieved:
This class is stored in the aCustomStyleClasses array:
Process custom CSS in XMLTemplateProcessor:
The custom class is written here: line 334
Line 511:
Line 130 of buttonRender.js:
In my example, aCustomClasses is not resolved
Back to my code, debug line 1450, why CSSStyle is not added to the button:
8081 is the SAP example, sStyleClasses can be successfully parsed:
But mine doesn't work:
Parse CSS:
More original articles by Jerry, all in: "Wang Zixi":
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。