Home Forums WoodMart support forum Klarna Popup Modal using var(–colorBackground) where is that coming from?

Klarna Popup Modal using var(–colorBackground) where is that coming from?

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #656718

    jasonUk44
    Participant

    When I click the standard ‘Learn More’ link in the Klarna checkout the popup is unreadable as its pulling the colours from the Woodmart theme some where but I cannot locate the colours or where it’s coming from. I cannot style it externally as it’s within an iframe and the CSS wont penetrate it.

    this is the CSS its using and the section thats bold ( background ) is the var(–colorBackground) its pulling from but I cant find that colour or referees anywhere..

    .p-PaymentMethodMessagingModal {
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    background-color: var(–colorBackground);
    border-radius: 20px;
    font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Ubuntu, sans-serif;
    left: 50%;
    letter-spacing: var(–letter-spacing);
    max-height: 655px;
    max-width: 571px;
    padding: 24px;
    position: absolute;
    top: 50%;
    width: 100%;
    z-index:10

    Attachments:
    You must be logged in to view attached files.
    #656971

    Luke Nielsen
    Keymaster

    Hello,

    The theme cannot affect the CSS in the iframe. This https://prnt.sc/RkTEV8KVU2yw variable is related to the iframe – https://prnt.sc/BjLJQdpliFHp , https://prnt.sc/UCKfXBNlX7HI

    So I suggest you contact the plugin support or check their documentation on how to change that color as the our theme cannot affect that area.

    Kind Regards

    #657052

    jasonUk44
    Participant

    Ive logged into the site this morning and all the colours have changed. Ive now go a random set of colours in the cart and the darker popup now shows lighter text.. Ive not altered anything at all.

    Please advise if you have changed anything at all as it’s now worse.

    • This reply was modified 2 months, 4 weeks ago by jasonUk44.
    Attachments:
    You must be logged in to view attached files.
    #657066

    Luke Nielsen
    Keymaster

    Hello,

    I didn’t log in to the site today. That form is situated in the iframe as well – https://prnt.sc/VXCdfoJtmR7Q

    Check the article below on how to change the style of the form:

    https://woocommerce.com/document/stripe/customization/style-payment-form/

    Kind Regards

    #657307

    jasonUk44
    Participant

    The iframe is pulling the colours from the site.. it’s not making them up randomly.
    Where is this coming from.

    background-color: var(–colorBackground);

    #657327

    Luke Nielsen
    Keymaster

    It’s defined in the iframe itself – https://prnt.sc/T0kwc64SbVZM , then scroll bottom and here is that variable – https://prnt.sc/_bNLrw2fGVDk , which is in the styles of the iframe itself.

    Kind Regards

    #657329

    jasonUk44
    Participant

    Is this generated dynamically and how can I target that. I have the plugin installed on other sites with the same base template and it’s a light variant.. could it be pulling that light/dark variation from somewhere in the themes setting?

    #657346

    Luke Nielsen
    Keymaster

    Hello,

    Use the code below to change bg color of that popup:

    add_filter( 'wc_stripe_upe_params', function ( $stripe_params ) {
    	$stripe_params['appearance'] = (object) [
    		'variables' => (object) [
    				'colorBackground' => 'white',
    			],
    	];
    	return $stripe_params;
    } );

    Define it in the functions.php file in your child theme.

    Kind Regards

    #657378

    jasonUk44
    Participant

    Thats fantastic. This is why people use your products time and time again… the support.
    Thank-you so much for your help.

    Is there a tutorial I can follow for this or did you come up with this completely bespoke?

    #657484

    Luke Nielsen
    Keymaster

    Hello,

    Our developer made it based on the documentation from Stripe.

    Let me know if you have any additional questions.

    Kind Regards

    #657515

    jasonUk44
    Participant

    Are there any other modifications I can add into this script to alter other options. Is the document they followed on the link you sent me or different…

    thanks again.. really helped.

    #657540

    Luke Nielsen
    Keymaster

    Hello,

    The developers used these documentations:

    https://woocommerce.com/document/stripe/customization/style-payment-form/

    https://docs.stripe.com/elements/appearance-api

    Thank you for your time.

    Kind Regards

Tagged: , ,

Viewing 12 posts - 1 through 12 (of 12 total)