Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
347 lines (313 sloc) 23.6 KB

Supported CSS in AMP for Email

This document outlines the CSS features currently supported inside AMP emails.

Applying CSS

Internal stylesheet

When using an internal stylesheet, the CSS is specified inside a single <style amp-custom> tag located in the <head> tag of the email.

Inline styles

In addition to an internal stylesheet, inline styles can be specified on any element using the style attribute.

External stylesheet

External stylesheets are not supported in AMP for Email.

Using <link rel="stylesheet" href="..."> is not allowed anywhere in the email.

Supported CSS selectors

Simple selectors

Warning: Attribute selector [attr=value] are not currently supported by all email providers.

Combinators

Pseudo-classes

Supported CSS properties

Additional restrictions

The following CSS properties have additional restrictions:

Property Restrictions
cursor The only allowed values are pointer and initial.
filter url() is not allowed.
transition Only opacity, transform, visibility and offset-distance can be animated.
visibility The only allowed values are hidden, visible and initial.
z-index Only values between -100 and 100 are allowed.

At-rules

The only at-rule currently supported is @media. See Media features for more information.

Custom fonts (@font-face)

Custom fonts are not supported in AMP for Email.

Media features

List of media features supported for conditionally applying rules via @media queries.

You can’t perform that action at this time.