amphtml icon indicating copy to clipboard operation
amphtml copied to clipboard

`<amp-fit-text>` ignores CSS that affects text layout

Open sparhami opened this issue 7 years ago • 5 comments

Originally reported as: https://github.com/ampproject/amp-by-example/issues/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.

sparhami avatar Aug 13 '18 17:08 sparhami