Upon experimenting with this concept by utilizing an interactive demonstration on the web3ui github documentation, I observed that the button
contains a span
element within it that manages the text color.
To modify the button's background color, the following code snippet should suffice:
.myDiv button { background-color:red !important }
However, if you aim to adjust the text color as well, the selector must be updated to:
.myDiv button span { color:red !important }
Refer to the illustration below for a clearer understanding. In the example, specific styling properties for the button shape are applied to the button
component, while text formatting is targeted at the span
nested inside.
https://i.sstatic.net/1MESU.png
If this solution addresses your concern, kindly confirm. Otherwise, feel free to notify me so I can further investigate.