AMP Layout page invalid
The following page is AMP invalid:
The parent tag of tag 'style amp-custom' is 'section', but it can only be 'head'.
https://validator.amp.dev/#url=https://amp.dev/documentation/guides-and-tutorials/learn/amp-html-layout/layouts_demonstrated&errno=0
https://amp.dev/documentation/guides-and-tutorials/learn/spec/amphtml/#stylesheets
it's valid: https://search.google.com/test/amp/result?id=Fn8wBJDd5Q1wcuWmI0eWbg
This is the invalid page: https://amp.dev/documentation/guides-and-tutorials/learn/amp-html-layout/layouts_demonstrated
On Thu, 21 Nov 2024 at 14:02, jay gray @.***> wrote:
it's valid: https://search.google.com/test/amp/result?id=Fn8wBJDd5Q1wcuWmI0eWbg
— Reply to this email directly, view it on GitHub https://github.com/ampproject/amp.dev/issues/6863#issuecomment-2490950427, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGE4I4VPBHYS57FCKFYLSYL2BXDTVAVCNFSM6AAAAABSCA252SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIOJQHE2TANBSG4 . You are receiving this because you authored the thread.Message ID: @.***>
ok, you are correct
here's probably what happened. that page needs CSS that is not defined in the SCSS libs and generated as compiled CSS during build.
so page authors added compiled CSS and placed it as a second instance of <style amp-custom> in <body> (since they cannot inject it into <head><style amp-custom> during build).
there is nothing invalid about the CSS; it's simply "in the wrong place"
an easy fix: transform target CSS to SCSS as a specific library and add that SCSS lib to page source.
Hi, I'm trying to make some contributions but when I try to set up the repo on my machine I get this error