ruby-on-rails-4braintreebraintree-rails

Rails Braintree - To override braintree-dropin.css


I am using braintree as payment gateway in one of my ruby on rails app. But I am unable to customize the braintree submit form styles(css) for dropin form submit created by braintree js. How could I customize / override the css (style)?


Solution

  • Full disclosure: I work at Braintree. If you have any further questions, feel free to contact support.

    Braintree's Drop-In form is externally hosted and loaded into your page using an iFrame. Because the form is hosted elsewhere, the only way you'd be able to change the appearance is if Braintree created javascript hooks into the CSS, as they do for their Hosted Fields form styling. There are no analogous hooks that let you edit the CSS for the Drop-In form, so no changes can be made to the Drop-In's appearance.

    The inability to edit the Drop-In form is a design choice made with the goal of keeping the Drop-In as simple as possible. If you're starting to run up against the limitations of the Drop-In form, consider using the Hosted Fields solution instead.