Skip to content

Instantly share code, notes, and snippets.

@hteumeuleu
hteumeuleu / apple-arkit2-ios12-test.html
Created September 26, 2018 15:43
Apple AR Kit 2 in an email test
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>iOS 12 ARKit 2</title>
<style>
body { font:1em "SF Pro Display", "SF Pro Icons", "Helvetica Neue", "Helvetica", "Arial", sans-serif; }
a { color:#0070c9; }
</style>
<meta name="x-apple-disable-message-reformatting" />
@hteumeuleu
hteumeuleu / darkModeHandler.ts
Last active March 30, 2023 14:00
Outlook.com darkModeHandler
import type { ContentHandler } from 'owa-controls-content-handler-base';
import { transformElementForDarkMode } from 'owa-dark-mode-utilities';
import {
ATTR_COLOR,
ATTR_BGCOLOR,
DATA_OG_STYLE_COLOR,
DATA_OG_ATTR_COLOR,
DATA_OG_STYLE_BACKGROUNDCOLOR,
DATA_OG_ATTR_BGCOLOR,
} from 'owa-content-colors-constants';
@hteumeuleu
hteumeuleu / outlook-ios.css
Last active November 11, 2022 08:32
CSS and JS included with an email on Outlook iOS
html{background:0 0!important;color:#000}li,ol,ul{margin:0}table{border-collapse:collapse;border-spacing:0}fieldset,img{border:0}q:after,q:before{content:""}abbr,acronym{border:0}img,input{border:none}
body {
padding: 0px 0px !important;
box-sizing: border-box;
margin: 0;
color: #E1E1E1FF !important;
font-family: '-apple-system', 'HelveticaNeue';
font-size: 12pt;
word-wrap: break-word;
-webkit-text-size-adjust: 106%;
@hteumeuleu
hteumeuleu / email-orange-target.html
Created August 1, 2016 08:42
Un exemple pour cibler le webmail Orange.fr
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8" />
<title>Orange Target</title>
<style type="text/css">
@media {
#o-header ~ * .client--orangefr { color:#fff !important; background:#2ecc40 !important; }
}
</style>
@hteumeuleu
hteumeuleu / vml-oned.html
Created March 21, 2019 11:36
VML onEd Attribute
<!DOCTYPE html>
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" lang="en">
<head>
<meta charset="UTF-8" />
<title>VML onEd</title>
</head>
<body>
<h1>onEd</h1>
<v:rect fillcolor="green" style="width:100px; height:100px;"></v:rect>
<v:rect fillcolor="yellow" style="position:relative; left:100px; width:100px; height:100px;"></v:rect>
@hteumeuleu
hteumeuleu / img-video.html
Created June 19, 2018 14:41
Testing support for <img src="video.mp4"> in email clients
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Testing support for &lt;img src="video.mp4"&gt; in email clients</title>
<style>
body { font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif; }
</style>
</head>
<body>
@hteumeuleu
hteumeuleu / mp4-to-jpg
Created June 30, 2017 13:30
Commands to generate a background sprite from an MP4 video (using ffmpeg and ImageMagick)
ffmpeg -i video.mp4 -r 1 img/frames_%04d.png
montage -tile 34x1 -geometry 640x960 *.png background.jpg
@hteumeuleu
hteumeuleu / mso-allowpng.html
Created July 6, 2018 13:41
Is AllowPNG actually useful ?
<!DOCTYPE html>
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" lang="fr">
<head>
<meta charset="UTF-8">
<title>Document</title>
<!--[if mso]>
<xml>
<o:OfficeDocumentSettings>
<o:AllowPNG/>
<o:PixelsPerInch>96</o:PixelsPerInch>
@hteumeuleu
hteumeuleu / fake-background-image.html
Created July 18, 2017 20:45
Fake background with a real image in email
<!DOCTYPE html>
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" lang="en">
<head>
<meta charset="UTF-8" />
<title>Fake background in emails</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<!--[if mso]>
<xml>
<o:OfficeDocumentSettings>
<o:AllowPNG/>
@hteumeuleu
hteumeuleu / transformElementForDarkMode.ts
Last active February 27, 2022 10:50
webpack://owa/packages/framework/owa-dark-mode-utilities/lib/utils/transformElementForDarkMode.ts
import Color from 'color';
import {
ATTR_COLOR,
ATTR_BGCOLOR,
DATA_OG_STYLE_COLOR,
DATA_OG_ATTR_COLOR,
DATA_OG_STYLE_BACKGROUNDCOLOR,
DATA_OG_ATTR_BGCOLOR,
} from 'owa-content-colors-constants';