Created by Wang, Jerry, last modified on Sep 25, 2015

理论上来说尽量不要自己 hardcode css 颜色,最好使用 UI5 提供的 less 颜色参数,具体有哪些颜色在这里可以找到:

https://sapui5.netweaver.ondemand.com/explored.html#/sample/sap.ui.core.sample.BasicThemeParameters/preview
但 css 中不能直接用 less 的参数( @xxx ),所以要调用 core.theming.Parameters.get() 方法来获取

jQuery . sap . require ( “sap.ui.core.theming.Parameters” );
var myColor = sap . ui . core . theming . Parameters . get ( “sapUiDarkBG” );

https://sapui5.netweaver.ondemand.com/docs/guide/89ec37d84a02428fb2462acd3dc283cb.html

SAP UI5对于颜色使用的最佳实践
SAP UI5对于颜色使用的最佳实践
SAP UI5对于颜色使用的最佳实践
SAP UI5对于颜色使用的最佳实践
要获取更多Jerry的原创文章,请关注公众号"汪子熙":

SAP UI5对于颜色使用的最佳实践

相关文章:

  • 2021-04-16
  • 2021-12-25
  • 2021-05-04
  • 2021-12-30
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-08-24
  • 2021-08-10
  • 2022-12-23
  • 2022-03-06
  • 2022-12-23
相关资源
相似解决方案