-
-
Notifications
You must be signed in to change notification settings - Fork 5.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
Fix:Circular loading spinner is oval in safari browser #29713
Conversation
@silverwind Can you update the issue content? Looks like we need to merge issue content and go-gitea#29651 (comment) as the commit message.
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.
thanks so much!
This will likely break this rule below which only sets height: gitea/web_src/css/modules/animations.css Line 48 in 8d55eaf
Further below, another variant sets both: gitea/web_src/css/modules/animations.css Lines 64 to 65 in 8d55eaf
So I think we should make all 3 rules the same, either set only 1 dimension, or both in all three rules. Regarding the Safari issue: Does changing |
I tried changing |
Ideally we set only one dimension and aspect-ratio, and the assumption was that that works in all browsers, no matter which dimension is set. I suggest we create a standalone https://jsfiddle.net/ example to showcase the Safari issue, and then investigate the possible workarounds. I prefer using |
I might have found the related one in the list you provided:https://codepen.io/legion80/pen/ZEPeLdz |
Yes, it's the same bug. It's strange that it only happens with |
I've made the adjustment:3102bd9 |
Hmm, we need to be really careful with these spinner CSS adjustments, they are used in many places in the UI. |
You're right, could there possibly be something that I've missed in my adjustments? Perhaps we can also opt for minimal changes, just fixing the positioning issue with |
I'd say keep changeset minimal to fix the issue. I think just switching |
updated
It seems that no results were found through the
updated |
It breaks the loading UI http://localhost:3000/devtest/gitea-ui Before: After: |
This seems to be caused by the flexible layout, it doesn't seem to be an effective method to solve |
Found a better workaround: #29801 |
Thanks for your effort in this PR @HEREYUA, I think we'll use the alternative proposed in the other PR. This PR was helpful in progressing towards the solution and is very much appreciated :) |
Fixes: go-gitea#29041 Fixes: go-gitea#29713 Any of the `width: *-content` properties seem to workaround this Webkit bug, this one seemed most suitable.
Backport #29801 by @silverwind Fixes: #29041 Fixes: #29713 Any of the `width: *-content` properties seem to workaround this Webkit bug, this one seemed most suitable. Before: <img width="184" alt="Screenshot 2024-03-14 at 22 29 58" src="https://github.com/go-gitea/gitea/assets/115237/6effc5f0-bc64-4752-be74-9c43b3974407"> After: <img width="177" alt="Screenshot 2024-03-14 at 22 30 30" src="https://github.com/go-gitea/gitea/assets/115237/5de244d7-6b46-428e-957c-4b10f53e2441"> Co-authored-by: silverwind <[email protected]>
Fixes: go-gitea/gitea#29041 Fixes: go-gitea/gitea#29713 Any of the `width: *-content` properties seem to workaround this Webkit bug, this one seemed most suitable. (cherry picked from commit 35def319fdb8c73aa5e2c52fad5230d287e2bd93)
Backport #29801 by @silverwind Fixes: go-gitea/gitea#29041 Fixes: go-gitea/gitea#29713 Any of the `width: *-content` properties seem to workaround this Webkit bug, this one seemed most suitable. Before: <img width="184" alt="Screenshot 2024-03-14 at 22 29 58" src="https://github.com/go-gitea/gitea/assets/115237/6effc5f0-bc64-4752-be74-9c43b3974407"> After: <img width="177" alt="Screenshot 2024-03-14 at 22 30 30" src="https://github.com/go-gitea/gitea/assets/115237/5de244d7-6b46-428e-957c-4b10f53e2441"> Co-authored-by: silverwind <[email protected]> (cherry picked from commit df23ec0f8b490bee49dc0e7944b529f3ede35301)
Fix:#29041
When defining height and aspect-ratio, Safari will calculate the width based on these two values. However, it appears that Safari applies the aspect-ratio based on the total height (which includes border-width), which may cause the total width of the element to be twice the border-width more than the total height.
When defining width and aspect-ratio, it seems that Safari accurately calculates the height based on these two values
Update:
In the following discussion, we found the same issue on the webkit bug:https://bugs.webkit.org/show_bug.cgi?id=267625
When absolute positioning is not used on
::after
, the problem mentioned above can be avoided, but this might affect some UI