Is calc() supported in html email?

前端 未结 3 1221
梦如初夏
梦如初夏 2020-12-21 05:49

caniuse.com shows calc() can be used today in all modern browsers except Opera. But how good is the support for calc() in email clients?

P

3条回答
  •  盖世英雄少女心
    2020-12-21 06:08

    EDIT: For Css Calc(), I would say that maybe you could use it in Apple Mail or iOS native client, but even those are not likely. All others have almost no CSS3 support. See https://www.campaignmonitor.com/css/ for a pretty good list of available CSS and HTML tags in HTML email. Admittedly, this is not the Be-All list of what works in HTML emails, but as Calc() is not even listed, I would view this as a no.

    EDIT2: Did a simple table html email to check results using Email On Acid and got surprising results.
    https://www.emailonacid.com/app/acidtest/display/summary/hM0n3RkP89L9bfWOtXlTpQR238VwFFotgq4PkQpvBOpUf/shared

    Basically looks like it works on:

    Apple Mail

    Outlook 2011 (apple version)

    Thunderbird

    Android 4 native client

    iOS native

    Aol (browser dependant)

    Outlook.com (browser dependant)

    (GMail will also accept it! - but must be inlined)

    This is better then I thought, but considering, it still doesn't seem to be that elegant a solution as it fails completely in many of the popular email clients - including every webmail app (GMail app, Yahoo app, etc). It may be a viable solution depending on your audience, but in general, I would not recommend.

提交回复
热议问题