Hello All,
I am trying to change the color of button text by applying css to sap.m.Button. For this, I have created css file with following content and included it using index.html.
.myRedButton {
color: red;
}
Then I tried to apply the color to the button as follows:
<Button class="myRedButton" text="Press Me"/>
However, the button text always comes with default color. When I inspected the button using chrome, I can see the color attribute from my custom class is striked out and it is picking up color from standard sapMBInner class (highlighted the details in the following image)
If i disable color attribute from sapMBtnInner class (from chrome), it is picking up myREdButton class and the button text changes to red.
I don't want to redefine sapMBtnInner class as it would affect all the buttons. Can you please tell me what is wrong in my implementation.
Regards,
Faddy
Request clarification before answering.
.myRedButton {
color: red !important;
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.