Class AmpFitText

AmpFitText class

Expands or shrinks its font size to fit the content within the space given to it.

public class AmpFitText : AmpComponent

Constructors

NameDescription
AmpFitText(string)Creates instance of AmpFitText.

Properties

NameDescription
Attributes { get; }AMP provides a set of common attributes that are extended to many AMP components.
Fallback { get; set; }A fallback is a convention that allows the element to communicate to the reader that the browser does not support the element.
MaxFontSize { get; set; }Specifies the maximum font size as an integer that the amp-fit-text can use.
MinFontSize { get; set; }Specifies the minimum font size as an integer that the amp-fit-text can use.
Placeholder { get; set; }The element marked with the placeholder attribute acts as a placeholder for the parent AMP element. If specified, a placeholder element must be a direct child of the AMP element.
override RequiredScript { get; }Required script that muct be added to head section.
Value { get; set; }Text Value of component.

Methods

NameDescription
override ToAmpHtml()Represents amp html version of component.
override ToHtml()Represents html version of component.

See Also