amp-facebook: add data-align-center attribute
Motivation
Currently amp-facebook component does not provide a way to center align the content.
The solution
amp-facebook should expose a data-align-center attribute. If the attribute is added by the page author text-align:center should be added to the <div id="c">.
Testing
Look at a sample in https://s.codepen.io/aghassemi/debug/zprmzV , note that the embed is not center aligned.
Now create a similar sample but set the new data-align-center attribute to amp-facebook, it should now be aligned to the center.
Step by step
- [ ] Claim this issue by adding a comment below. Please only claim this bug if you plan on starting work in the next day or so.
- [ ] If you aren't too familiar with Git/GitHub, see the Getting Started End-to-End Guide for an intro to Git & GitHub, and how to get a copy of the code. You can also refer to the Quick Start Guide for the necessary setup steps with less explanation than the End-to-End guide.
- [ ] Follow the instructions for building AMP.
- [ ] Create a Git branch for making your changes.
- [ ] Commit your changes frequently.
- [ ] Push your changes to GitHub.
- [ ] Create a Pull Request. Mention
closes Issue #12093in the description. - [ ] Assign @aghassemi as the reviewer
- [ ] Respond to your reviewer's comments (if any).
Once approved, your changes will be merged. ⚡⚡⚡Congrats on making your first contribution to the AMP Project!⚡⚡⚡ You'll be able to see it live across the web soon!
Thanks, and we hope to see more contributions from you soon.
Questions?
If you have questions ask in this issue or on your Pull Request (mentioning @aghassemi) or see the How to get help section of the Getting Started guide.
Setting the environment up to solve this @aghassemi. I'll update when PR is ready.
@rojasmi1 Awesome. Thanks!
Hi, should this issue be closed since the fix has landed?
You are right @nainar. Closed by #12538. Thanks @vinitnalh, closing.