title: How to add custom CSS to paypal smart buttons
body: <p>What I am trying to achieve is not actually get the payment button background to be black but rather be a custom color, so for instance lets say I want it pink with white letters (just as example), How can I achieve this?</p>
  <pre><code>&lt;div id=&quot;paypal-button-container&quot;&gt;&lt;/div&gt;
  &lt;script src=&quot;https://www.paypal.com/sdk/js?client-id=#################&amp;vault=true&amp;intent=subscription&quot; data-sdk-integration-source=&quot;button-factory&quot;&gt;&lt;/script&gt;
  &lt;script&gt;
      paypal.Buttons({
          style: {
              shape: 'pill',
              color: 'black',
              layout: 'vertical',
              label: 'subscribe',
              size: 'responsive',
          },
          createSubscription: function(data, actions) {
              return actions.subscription.create({
                  'plan_id': 'P-##########'
              });
          },
          onApprove: function(data, actions) {
              alert(data.subscriptionID);
          }
      }).render('#paypal-button-container');
  &lt;/script&gt;
  </code></pre>
  <p>I have already tried the following (offcourse it didn't work):</p>
  <pre><code>&lt;style&gt;
  .paypal-button.paypal-button-shape-pill {
    background: pink!important;
    color: white!important;
  }
  &lt;/style&gt;
  </code></pre>
  <p>and because it is generated inside an iframe I also tried the following:</p>
  <pre><code>&lt;script&gt;
  window.onload = function() {
     let myiFrame = document.getElementById(&quot;someId&quot;);
     let doc = myiFrame.contentDocument;
     doc.body.innerHTML = doc.body.innerHTML + '&lt;style&gt;.paypal-button.paypal-button-shape-pill{background: pink!important;color: white!important;}&lt;/style&gt;';
  }
  &lt;/script&gt;
  </code></pre>
  <p>Sadly, It still is not achieved yet. Can someone help me out with this problem?</p>
  <p>Edit:
  Just want to mention I cannot just change the style color in the script of paypal.buttons because than the buttons don't show up anymore.</p>