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
Update amp-bind.md #7704
Update amp-bind.md #7704
Conversation
extensions/amp-bind/amp-bind.md
Outdated
@@ -98,7 +98,7 @@ For AMP components, only select attributes are bindable: | |||
| Component | Attributes | | |||
| --- | --- | | |||
| amp-carousel | slide | | |||
| amp-img | src, srcset, alt | | |||
| amp-img | src, srcset, alt, height, width | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We actually support [width] and [height] on all AMP extensions. Can you remove this from the table and maybe add a sentence above?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then should this include the other three supported tags?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@choumx - Are the common attributes for AMP components bindable? If so, then as you say, remove height
and width
and replace this sentence:
"For AMP components, only select attributes are bindable"
with this:
"For AMP components, the common attributes are bindable along with the following specific attributes:"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@choumx can correct me if I'm wrong but I don't think we're going to support all of those attributes. For instance the on
attribute is used to communicate state changes to bind; allowing that itself to be a bind attribute could get pretty hairy.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct, only width and height for all AMP extensions for now. Looks like the implementation in bind-validator.js
is out of date.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, then I suggest rewriting that sentence to:
For AMP components, the height
and width
attributes are bindable along with the following specific attributes:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. Thanks!
@choumx please merge |
* Update amp-bind.md * Update amp-bind.md * Update amp-bind.md
Add
width
andheight
as attributes that support bindings onamp-img