Search code examples
amp-html

Unclosed Script Tag in AMP CSS boilerplate?


When I unminify the line of AMP CSS boilerplate code, it appears there is a missing > closing out the style element.

Am I misreading this?

<noscript>
    <style
        amp-boilerplate > body {
            -webkit-animation:none;
            -moz-animation:none;
            -ms-animation:none;
            animation:none
        }
    </style>
</noscript>

Solution

  • Yes, you are. It's not a malformed <style> start tag followed by a amp-boilerplate > body rule, but a well-formed <style amp-boilerplate> start tag with a non-standard (given that this is AMP HTML) amp-boilerplate attribute followed by a body rule.

    If you're using a tool to unminify and not doing it by hand, the non-standard attribute might be throwing it off, but then that doesn't explain it leaving the start tag malformed like that...