<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question How to stylize the colors of buttons in spModal? in Developer forum</title>
    <link>https://www.servicenow.com/community/developer-forum/how-to-stylize-the-colors-of-buttons-in-spmodal/m-p/2476712#M966301</link>
    <description>&lt;P&gt;Hi community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do I stylize the colors of the buttons on a spModal dialog box? I tried using class: and style:, class doesn't work and style: doesn't seem to apply the colors even though it is specified in the CSS page.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;$scope.onActionClick = function(state) {
        if (state === c.data.CONST.REJECT_STATE) {
            if (c.data.requireRejectionComment &amp;amp;&amp;amp; !c.data.useCommentBox) {
                // Create an input popup
                spModal.open({
                    title: c.data.CONST.i18n.REJECT_MODAL_TITLE,
                    message: c.data.CONST.i18n.REJECT_MODAL_MESSAGE,
                    input: true,
                    buttons: [
                        {label: c.data.CONST.i18n.REJECT_MODAL_CANCEL, cancel: true},
                        {label: c.data.CONST.i18n.REJECT_MODAL_SUBMIT, primary: true, style: "reject-button" } //tried adding this to the CSS page and tried using class:, it does not work&lt;/LI-CODE&gt;&lt;LI-CODE lang="css"&gt;.reject-button {
    background-color: red;
    color: white;
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 14 Feb 2023 00:08:08 GMT</pubDate>
    <dc:creator>zynsn</dc:creator>
    <dc:date>2023-02-14T00:08:08Z</dc:date>
    <item>
      <title>How to stylize the colors of buttons in spModal?</title>
      <link>https://www.servicenow.com/community/developer-forum/how-to-stylize-the-colors-of-buttons-in-spmodal/m-p/2476712#M966301</link>
      <description>&lt;P&gt;Hi community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do I stylize the colors of the buttons on a spModal dialog box? I tried using class: and style:, class doesn't work and style: doesn't seem to apply the colors even though it is specified in the CSS page.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;$scope.onActionClick = function(state) {
        if (state === c.data.CONST.REJECT_STATE) {
            if (c.data.requireRejectionComment &amp;amp;&amp;amp; !c.data.useCommentBox) {
                // Create an input popup
                spModal.open({
                    title: c.data.CONST.i18n.REJECT_MODAL_TITLE,
                    message: c.data.CONST.i18n.REJECT_MODAL_MESSAGE,
                    input: true,
                    buttons: [
                        {label: c.data.CONST.i18n.REJECT_MODAL_CANCEL, cancel: true},
                        {label: c.data.CONST.i18n.REJECT_MODAL_SUBMIT, primary: true, style: "reject-button" } //tried adding this to the CSS page and tried using class:, it does not work&lt;/LI-CODE&gt;&lt;LI-CODE lang="css"&gt;.reject-button {
    background-color: red;
    color: white;
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2023 00:08:08 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/how-to-stylize-the-colors-of-buttons-in-spmodal/m-p/2476712#M966301</guid>
      <dc:creator>zynsn</dc:creator>
      <dc:date>2023-02-14T00:08:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to stylize the colors of buttons in spModal?</title>
      <link>https://www.servicenow.com/community/developer-forum/how-to-stylize-the-colors-of-buttons-in-spmodal/m-p/2477332#M966525</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://www.servicenow.com/community/user/viewprofilepage/user-id/448022"&gt;@zynsn&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you are using the above code then u have to use class instead of style. And add class on button not in label.&lt;/P&gt;&lt;P&gt;Else u can add CSS like this:-&lt;/P&gt;&lt;P&gt;div &amp;gt; button &amp;gt;.btn{&lt;/P&gt;&lt;PRE&gt;  &lt;SPAN class=""&gt;/* your css ... */&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;Please refer this link also:&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.servicenow.com/community/developer-forum/how-to-style-spmodal-buttons/m-p/1784636" target="_blank" rel="noopener"&gt;https://www.servicenow.com/community/developer-forum/how-to-style-spmodal-buttons/m-p/1784636&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please mark my answer as accepted solution and helpful, if it works for you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2023 10:17:33 GMT</pubDate>
      <guid>https://www.servicenow.com/community/developer-forum/how-to-stylize-the-colors-of-buttons-in-spmodal/m-p/2477332#M966525</guid>
      <dc:creator>Community Alums</dc:creator>
      <dc:date>2023-02-14T10:17:33Z</dc:date>
    </item>
  </channel>
</rss>

