Coming off Legacy Checkout – make inputs full width
-
I’m starting to look at moving clients off of the legacy checkout. On the new checkout there are divs around the inputs which set the widths at various breakpoints – GridCell p-GridCell–12 p-GridCell–xs6 p-GridCell–sm6 p-GridCell–md3.
I want all three input fields to be 100% wide on all breakpoints. I am able to do this with the legacy checkout. How can I achieve this with the new one? i have tried adding a rule for .p-GridCell, the one for .Input (from the docs) works but not the .p-GridCell one:
add_filter( 'wc_stripe_upe_params', function ( $stripe_params ) {
/**
* Custom shortcode checkout styles -- Use Stripe's Flat Theme
*/
$stripe_params['appearance'] = (object) [
'theme' => 'flat',
'variables' => (object) [
'colorPrimary' => '#0570de',
'colorBackground' => 'blue',
'colorText' => '#30313d', //label colour
'colorDanger' => '#df1b41',
'fontFamily' => 'futura-pt',
'spacingUnit' => '2px',
'borderRadius' => '4px',
],
'rules' => (object) [
'.p-GridCell' => (object) [
'width' => '100%'
],
'.Input' => (object) [
'color' => 'orange'
]
]
];
return $stripe_params;
} );
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.