Skip to content

<amp-fit-text> ignores CSS that affects text layout #17464

Description

@sparhami

Originally reported as: ampproject/amp-by-example#1454

When you apply any CSS to <amp-fit-text> that affects the size (e.g. padding, border), the sizing is done without taking any of those properties into consideration.

As a workaround, you can apply the styles to a parent container of <amp-fit-text>, which will affect the the measuring element. This workaround does not work for line-height, since that is set on the measuring Element directly.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions