Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to make a menu in AMP? #2606

Closed
juniorneo2 opened this issue Mar 16, 2016 · 3 comments
Closed

How to make a menu in AMP? #2606

juniorneo2 opened this issue Mar 16, 2016 · 3 comments

Comments

@juniorneo2
Copy link

Hi people,

I need make a menu in AMP like this http://mobile.nytimes.com/international/, but I don't know how to do in AMP. Someone can help me? I developed a custom tag of web components(polymer) but does not work.

@dvoytenko
Copy link
Contributor

@juniorneo2 There are two approaches that frequently in use today:

  1. :focus singling selector. In this case when button is focused, the CSS selectors trigger display of the menu.
  2. :target selector. In this case you'd have a <a href="#menu"> tag. Clicking on it, the :target selector can activate the menu.

These two approaches are rather complicated by position:fixed and scrolling bugs to support this easily across the browsers. So, to address this, we are working on #827 to support menus as a direct extension to AMP. Please follow that issue and I will close this one for now. Feel free to reopen if you have additional questions.

@juniorneo2
Copy link
Author

@dvoytenko Thank you!

I have a last question. Can I use Web Components in my project AMP? Like Polymer

https://www.polymer-project.org/1.0/docs/start/quick-tour.html

Thank you.

@dvoytenko
Copy link
Contributor

Nope. Not at this time. Even though they use a similar technology, they are currently separate. But if there are some things that you really like in that library and would like to have here - please do let us know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants