-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Refactor: Use AspectRatio
in Youtube
component
#8445
Refactor: Use AspectRatio
in Youtube
component
#8445
Conversation
✅ ethereum-org-website-dev deploy preview ready
|
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.
Love this.
There is one more place where we are using an iframe
:
https://github.com/ethereum/ethereum-org-website/blob/dev/src/content/developers/docs/consensus-mechanisms/pos/attack-and-defense/index.md#L68
I think we should implement the AspectRatio
in there as well since without those global styles it is breaking.
@pettinarip I shall make a note to take a look at that as well. 👍 |
@pettinarip Would you consider a more generalized With what the
You would have to supply this new component with the above styling as default to override the defaults coming from the Chakra component, as What do you think? |
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.
@TylerAPfledderer thanks for sharing that thinking, really appreciate it.
Now that I think more about it, I think that we are good and we cover most of our use cases with this refactor and component that you did in this PR.
I don't think that we need a more generalized component for this right now unless we see more often that we use this component.
Merging it as it is for now. Good job on it!
Description
Replaces
Box
component with a more robustAspectRatio
component, which is primarily used for media elements. Adds enhanced sizing with aspect ratio equal, and equal existing sizing of the iframe in its current rendering.It also creates a better render at mobile screen sizes.
Before:
After:
Note:
This makes the
iframe
styling in the styles file unnecessary.Related Issue
N/A