Custom Code for Button Gradient

I’d like all my primary buttons to have a gradient.

I can’t seem to get any code to work.

I saw this in another thread:

<style>
#cta2 .MuiButtonBase-root:hover {
    background-color: #000000 !important;
    color: #000000 !important;
    border-color: #F5E507 !important;
}
</style>

and thought I could alter it like this (I was applying to one specific block to test, but would prefer code for all primary buttons):

<style>
#user-accounts1 .MuiButtonBase-root: {
  background-color: linear-gradient(90deg, #5ED3F3 0%, #3B82F6 100%) !important;
  color: #ffffff !important;
}
</style>


but it’s not working.

Could someone please help me with a piece of code I could use?

Thank you so much! :smiley:

Hi! I got some code working that does this. Is it what you were looking for?