Unable to change the background color of the button gtkmm 3 C++

I used this Custom Widgets from Gtkmm 3 Documentation

I set the name of the button
demoButton->set_name(Glib::ustring::format("my-widget"));

loading the css from the src

m_refCssProvider = Gtk::CssProvider::create();
  auto refStyleContext = Gtk::Widget::get_style_context();
  // refStyleContext->add_provider(m_refCssProvider,GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
  // link:https://stackoverflow.com/questions/8952679/gtkmm-3-button-background-color-change
  refStyleContext->add_provider(m_refCssProvider,GTK_STYLE_PROVIDER_PRIORITY_USER);
  m_refCssProvider->signal_parsing_error().connect(
    sigc::mem_fun(*this, &MyClass::on_parsing_error));


  try
  {
    m_refCssProvider->load_from_path("src/gladeFiles/custom_gtk.css");
  }
  catch(const Gtk::CssProviderError& ex)
  {
    std::cerr << "CssProviderError, Gtk::CssProvider::load_from_path() failed: "
              << ex.what() << std::endl;
  }
  catch(const Glib::Error& ex)
  {
    std::cerr << "Error, Gtk::CssProvider::load_from_path() failed: "
              << ex.what() << std::endl;
  }

This is the css file content

/* Example of a CSS style sheet with a custom style property.
 *
 * The name of the style property must have its canonical form, i.e. characters
 * other than ASCII letters, digits, and hyphens must be replaced by hyphens.
*/

* {
  /* -<widget class name>-<style property canonical name>: <value>; */
  -gtkmm__CustomObject_mywidget-example-scale: 920;
}

#my-widget {
  background-color: rgb(255,0,0);
  color:            rgb(0,0,255);
}

I do not get any error on loading the css file. The Button does not change the color to red.

Do not know what is going wrong!

Can help in correcting me If I missed something?

Hello @santhoshnumberone! Buttons in GTK3 have a background-image property set by default (assuming the Adwaita theme). Try that:

#my-widget {
  background-image: none;
  background-color: rgb(255,0,0);
  color:            rgb(0,0,255);
}