-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
ENH: Don't center the HTML animation rendering (Fixes #11795) #11816
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
Conversation
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.
I didn't really check the control alignment, but will take your word for it that its an improvement. But I agree that not centring the animations we create makes sense (downstream user should do so when they embed them).
I've hacked the CSS changes into the first animation of https://splines.readthedocs.io/en/latest/bezier.html: The result is not quite convincing:
IMO the best solution ist to center-align all the controls with respect to the image and left-align the bounding div. This can be achieved e.g. by That would basically be sufficient. Not a CSS guru, but as propsed in https://developer.mozilla.org/en-US/docs/Web/HTML/Element/div#Attributes you may additionally replace the align attibute by CSS Grid or CSS Flexbox if you want to get rid of it. |
I'm ok with that. Honestly, I just didn't have the time or will to look up the proper CSS, so thanks for doing it for me. 😁 |
Ok. Do you update your commit? |
I will. |
a8305df
to
320dc30
Compare
Ok, updated. I also took the opportunity to replace the "deprecated" |
You added margin:auto but contrary to your last comment align is still there. Is that intentional? Also can you please use a consistent style of spacing in the style tag (minor thing). |
Centering the animations makes them align differently than the regular images in the notebook. Also, align attribute is somewhat deprecated. This changes to use inline-block with a div to put the whole animation at the left, and then center the controls within that block.
320dc30
to
7afb3b0
Compare
Good catch. Fixed. Actually revealed a problem where |
Superseeded by #12098 I think? Feel free to re-open if I'm wrong. |
Centering the animations makes them align differently than the regular
images in the notebook. Also, align attribute is somewhat deprecated.
This adjusts some of the styling as well so that the controls are
somewhat aligned with themselves.
Closes #11795 .
PR Checklist