diff --git a/src/credit-card/index.ts b/src/credit-card/index.ts index f39a5e3..20d0bb4 100644 --- a/src/credit-card/index.ts +++ b/src/credit-card/index.ts @@ -41,6 +41,8 @@ export function form( target = el; } + target.className = target.className + " secure-payment-form"; + const gateway = getGateway(); if (gateway && gateway.getEnv(options) !== "production") { @@ -115,6 +117,8 @@ export function trackReaderForm( target = el; } + target.className = target.className + " secure-payment-form"; + const gateway = getGateway(); if (gateway && gateway.getEnv(options) !== "production") { diff --git a/src/echeck/index.ts b/src/echeck/index.ts index ff6a249..350acc1 100644 --- a/src/echeck/index.ts +++ b/src/echeck/index.ts @@ -42,6 +42,8 @@ export function form( target = el; } + target.className = target.className + " secure-payment-form"; + const gateway = getGateway(); if (gateway && gateway.getEnv(options) !== "production") { diff --git a/src/gift-and-loyalty/index.ts b/src/gift-and-loyalty/index.ts index e435b13..16d2979 100644 --- a/src/gift-and-loyalty/index.ts +++ b/src/gift-and-loyalty/index.ts @@ -42,6 +42,8 @@ export function form( target = el; } + target.className = target.className + " secure-payment-form"; + const gateway = getGateway(); if (gateway && gateway.getEnv(options) !== "production") { diff --git a/src/internal/lib/styles/default.ts b/src/internal/lib/styles/default.ts index b5dbb9c..b603e05 100644 --- a/src/internal/lib/styles/default.ts +++ b/src/internal/lib/styles/default.ts @@ -139,11 +139,11 @@ export const fieldStyles = { }; export const parentStyles = { - body: { + ".secure-payment-form": { "font-family": "sans-serif", }, - label: { + ".secure-payment-form label": { color: "#555", "font-size": "13px", "font-weight": "bold", @@ -151,26 +151,26 @@ export const parentStyles = { "text-transform": "uppercase", }, - "#ss-banner": { + ".secure-payment-form #ss-banner": { background: `transparent url(${imageBase}shield-and-logos@2x.png) no-repeat left center`, "background-size": "280px 34px", height: "40px", "margin-bottom": "7px", }, - div: { + ".secure-payment-form div": { display: "block", }, - iframe: { + ".secure-payment-form iframe": { width: "300px", }, - ".form-row": { + ".secure-payment-form .form-row": { "margin-top": "10px", }, - ".form-wrapper": { + ".secure-payment-form .form-wrapper": { display: "block", margin: "10px auto", width: "300px",