mudu
mudu

Reputation: 53

How to override inline styles in AMP pages?

I have an html body with some tags containing inline styles.Normally we could override inline with !important But as I need the page to be AMP valid , I couldn't use this method. Any way to do this in AMP valid method ??

Upvotes: 2

Views: 905

Answers (1)

stylesuxx
stylesuxx

Reputation: 845

No. As you mentioned, in AMP you can not use the !important style. Also you can only have one style tag and it has to be in the head tag.

You can override the general styles inline but not the other way around.

AMP needs to be able to enforce its element sizing rules, allowing the !important style would interfere with that.

Upvotes: 3

Related Questions