`<amp-fit-text>` ignores CSS that affects text layout
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.
This issue hasn't been updated in awhile. @aghassemi Do you have any updates?
line-height is a hard-coded constant, const LINE_HEIGHT_EM_ = 1.15;. We could add an optional attribute to override the constant value. Happy to submit a PR for this ...
@sparhami let's verify with amp-truncate-text and close if not an issue there?
I would like to use amp-fit-text in an email and customize the line height, and I can't use amp-truncate-text because it is not available for email. Any chance we can make it possible to customize the line height as already suggested?
@caroqliu FYI
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.