Hello Ayman,
The best way to implement custom styling is through the stylesheets and not directly on to the control/icon.
To see if your styling is working well the best thing to do is to run your application and check the application in the browser.
More info can be found here :
https://docs.mendix.com/howto/front-end/customize-styling-new/
or in the learning paths.
Hope this helps,
Good luck!