Styles for wrapping input (SASS):
.ginput_container_creditcard {
.ginput_full {
.StripeElement {
&--invalid {
}
}
label {
}
}
}
Function for modifying Stripe Element Styles (see documentation):
<?php
// style stripe checkout
add_filter( 'gform_stripe_elements_style', 'set_stripe_styles', 10, 2 );
function set_stripe_styles( $cardStyles, $formId){
$cardStyles['base'] = [
'color' => '#fff',
'fontSize' => '16px',
'fontFamily' => '',
'fontSmoothing' => '',
'fontStyle' => '',
'fontVariant' => '',
'fontWeight' => '',
'iconColor' => '',
'lineHeight' => '',
'letterSpacing' => '',
'textAlign' => '',
'padding' => '15px',
'textDecoration' => '',
'textShadow' => '',
'textTransform' => '',
':hover' => [
'color' => '',
],
':focus' => [
'color' => '',
],
'::placeholder' => [
'color' => '#71777a',
],
'::selection' => [
'color' => '',
],
':-webkit-autofill' => [
'color' => '',
],
':disabled' => [
'color' => '',
],
];
$cardStyles['complete'] = [
];
$cardStyles['empty'] = [
];
$cardStyles['invalid'] = [
];
return $cardStyles;
}