I am using snipcart in my react web app. Reading their docs I found out that I cannot override the css of the payment form because that payment form is being loaded in an iframe and to customize it , I have to use their javascript sdk like this:
Snipcart.api.theme.customization.registerPaymentFormCustomization({
label: {
color: '#fff',
},
legend: {
color: '#fff'
},
});
Now this is working great for legend and label elements, but there's one paragraph in snipcart form as well which has class test-card-hint. And I can't find any way to override it. I have tried passing down following values:
Snipcart.api.theme.customization.registerPaymentFormCustomization({
label: {
color: '#fff',
},
legend: {
color: '#fff'
},
p:{
color:"#fff"
}
});
Snipcart.api.theme.customization.registerPaymentFormCustomization({
label: {
color: '#fff',
},
legend: {
color: '#fff'
},
".test-card-hint":{
color: '#fff'
}
});
Also tried using sibling selector like legend ~ p but to no avail.
You can see in the image below that only styles for label and legend are being generated.
Here is the html markup for the form:
Does anyone know of a workaround to this? Is it possible to override css for this particular element at all?