#tonyball333-card-element-zoom
1 messages ยท Page 1 of 1 (latest)
Hello ๐
Increasing the font-size have helped in the past I believe.
Let me check if there are any alternatives here.
Thanks. Currently, I am using the card element defaults i.e. I am not passing any styling to the Card Element
Yeah I believe this is a known issue with how chromium does things.
You'd likely want to play around with calculated fontSizes for the element and find what sizes are above zoom threshold (when browser decides to stop zooming in).
If there's a specific device/browser/OS/configuration target you want to avoid zooming on you can adjust your CSS to make sure the resulting calculated font size on that target is above the zoom threshold.
I read that 16px should do it but I went up to 30px and its still zooming on just those 2 fields.
cardElement = elements.create("card", {
style:
{
base: {
'fontSize': '30px'
}
}
});
When I change the font I do see the font size change in the Card Element and so I am happy that the jquery above is passing in the style. I don't know whether my sites CSS can affect the Card Element zoom, but its only these 2 card element fields that zoom on my site
๐ stepping in here
Give me a moment to catch up
Ah okay yeah this is a known thing
It's about the calculated font size, not the size you set in your CSS, and the way the specific browser/device/OS combo decides when zooming is what should happen. It's unlikely you will ever be able to prevent this in all cases, but what you can do is use the browser dev tools to see what the calculated size of the font when rendered is and go from there. It's likely being adjusted by accessibility/text options at the OS level.
OK thanks. The remark "adjusted by accessibility/text options at the OS level" is interesting and I will check to see what it does on other devices and os
It may be worth filing a bug report with Chrome and asking them to provide the ability to handle this zoom
Do you know why the zoom only takes effect for CVC and Zip onl?
I don't โ that is all based on the variables