Giter Site home page Giter Site logo

amp-pixel breaks the page about amphtml HOT 6 CLOSED

ampproject avatar ampproject commented on May 20, 2024
amp-pixel breaks the page

from amphtml.

Comments (6)

cramforce avatar cramforce commented on May 20, 2024

@dvoytenko
On Sep 10, 2015 9:12 AM, "teleservizi" [email protected] wrote:

Git pulled on 10 sept 2015
By adding an the page turns blank. I'm getting the following error in
Chrome's console
Uncaught Error: Layout not supported for: container
ElementProto.firstAttachedCallback_ @ viewport.js:45
ElementProto.attachedCallback @ viewport.js:22
Regards
Enrico Canardi


Reply to this email directly or view it on GitHub
#56.

from amphtml.

dvoytenko avatar dvoytenko commented on May 20, 2024

So far we've used amp-pixel always with width=1/height=1. I guess that's not super apparent? Should we just hardcode the dimensions when not specified for amp-pixel?

from amphtml.

teleservizi avatar teleservizi commented on May 20, 2024

Found the problem, the < amp-pixel > tag has to be closed with </ amp-pixel > otherwise it will wrap every following tag inside the amp-pixel and of course setting width and height solves the jscript error

from amphtml.

teleservizi avatar teleservizi commented on May 20, 2024

Please add to the amp-html-components.md file the mandatoriness of the width and height attributes

from amphtml.

cramforce avatar cramforce commented on May 20, 2024

@dvoytenko Yeah, in this case we definitely should. They are not visible anyway.
@teleservizi We do document this in the amp-html-format.md but I agree it should be relaxed here.

from amphtml.

dvoytenko avatar dvoytenko commented on May 20, 2024

amp-pixel is now automatically configured and doesn't require width/height/layout attributes.

from amphtml.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.