This document describes AMP CSS classes prefixed with amp-
. These classes allow for customizations of some features of AMP runtime and extensions.
AMP provides the following CSS classes that are set on the document's body
to assist with some typical desktop and mobile cases:
amp-mode-touch
: This class is set when AMP detects touch input.amp-mode-mouse
: This class is set when AMP detects mouse input.amp-mode-keyboard-active
: This class is set when AMP detects that the keyboard is active.
See the Styling section in the AMP component's reference documentation to learn about specific amp-
classes used for that component (for example, amp-carousel-button-prev
in amp-carousel
).