Button css:{"background-color":"magenta"} not working?

from this snippet - Code Snippet
if I dont want to create css file, and just change css here, is it possible? or do I have to write it in any other specific format?
I found this in the ui.button but is it still working?
Screenshot 2022-07-20 105412

Hello @savirusing ,
There is a list of button’s css classes .
You can add a uniqie css class to your button and change the styles in the style tag like here: Code Snippet .

@MariyaDemy I’ve already done this method, and it work perfectly fine, but in this case
css:{background:“red”} is written in css of ui.button, Properties Webix Docs
and it not working as what I expect. now with new example Code Snippet , this may explain more about what i’m trying to do.

@savirusing
you need to change style values for inner button element.
try this instead
https://snippet.webix.com/o9qncy5a

1 Like

@savirusing ,
Thank you for the example!
The fact is that in case of css property both the name of the CSS class or the object with styles will be applied only to the view container, which is a div container in this case. It is a common behavior for all Webix components.
I’m sorry that the documentation misled you. We will update the article to note this fact.
So, you still need a class as in my example above. Also, there are addCss and addStyle methods to add the class dynamically to the page.
Or, you could try the solution that has been suggested above.

1 Like

@intregal @MariyaDemy
thanks for all the idea, I tried to create a function to render it. This post is just in case I forget how it works!
:slight_smile:
https://snippet.webix.com/13rt257u