Skip to content

bug: increasing size of ion-spinner results in blurry animation on iOS #18115

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

Closed
asgeo1 opened this issue Apr 24, 2019 · 3 comments · Fixed by #27424
Closed

bug: increasing size of ion-spinner results in blurry animation on iOS #18115

asgeo1 opened this issue Apr 24, 2019 · 3 comments · Fixed by #27424
Labels
package: core @ionic/core package type: bug a confirmed bug report

Comments

@asgeo1
Copy link

asgeo1 commented Apr 24, 2019

Bug Report

Ionic version:
[x] 4.2

Current behavior:
I am using the LoadingController in @ionic/angular to show a loading animation with spinner:

    this.loadingController.create({
      cssClass: 'loading-container',
      spinner: 'circles',
      translucent: true
    })

It's quite small on the screen, so I'm trying to increase the size of it using CSS.

Sadly there don't appear to be any good ways to increase the size of <ion-spinner> with Ionic v4.

Using CSS transform: scale(5); will scale it up. However, because of the CSS animations, it ends up looking blurry on iOS. (android is fine though)

From what I understand, this is a long standing bug in mobile Safari, that occurs when scale is applied to a CSS animation. (if you google for this, you'll get a tonne of links)

Note that in Ionic v1, sizing an <ion-spinner> wasn't an issue, since it was possible to size it by just doing this:

      .spinner svg {
        width: 15rem;
        height: 15rem;
      }

Which avoids the transform: scale Safari bug.

Unfortunately this method doesn't work in Ionic v4, and it results in the <ion-spinner> looking very odd if tried.

End result is that there's no good way to increase the size of <ion-spinner>, and I'm kind of forced to use the transform: scale approach and just have it look all blurry on iOS.

Expected behavior:
It should be possible to size a <ion-spinner> without making it blurry

Steps to reproduce:
As above

Related code:
As above

Other information:
None

Ionic info:

Ionic:

   ionic (Ionic CLI)             : 4.12.0 (/Users/asgeo1/.node/lib/node_modules/ionic)
   Ionic Framework               : @ionic/angular 4.2.0
   @angular-devkit/build-angular : 0.12.4
   @angular-devkit/schematics    : 7.2.4
   @angular/cli                  : 7.2.4
   @ionic/angular-toolkit        : 1.4.0

Cordova:

   cordova (Cordova CLI) : 8.1.2 ([email protected])
   Cordova Platforms     : android 7.1.4, ios 4.5.5
   Cordova Plugins       : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 3.1.2, (and 20 other plugins)

System:

   Android SDK Tools : 26.1.1 (/Users/asgeo1/Development/Android/sdk)
   ios-deploy        : 1.9.4
   ios-sim           : 5.0.6
   NodeJS            : v10.10.0 (/usr/local/bin/node)
   npm               : 6.8.0
   OS                : macOS Mojave
   Xcode             : Xcode 10.2.1 Build version 10E1001
@ionitron-bot ionitron-bot bot added the triage label Apr 24, 2019
@brandyscarney
Copy link
Member

Thanks for the issue! The spinner in Ionic 4 is using width and height to customize its size. This seems to work fine on the Android default spinner. I can confirm that there seems to be an issue with the following spinners though: circles, dots, and bubbles. Here is a Codepen where I reproduced this: https://codepen.io/brandyscarney/pen/xNqVxw

@brandyscarney brandyscarney added package: core @ionic/core package type: bug a confirmed bug report labels May 15, 2019
@ionitron-bot ionitron-bot bot removed the triage label May 15, 2019
@bashoogzaad
Copy link

Would be great if the resizing of the spinner with width and height would be documented. This was the only place where I could find it.

@liamdebeasi liamdebeasi added type: bug a confirmed bug report and removed type: bug a confirmed bug report labels Mar 13, 2023
mapsandapps added a commit that referenced this issue May 12, 2023
Issue number: Resolves #18115

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->
Resizing the `ion-spinner` by setting the width & height using CSS works
for most spinner variants, but not for `dots`, `bubbles`, and `circles`.
The spacing between the circles on these spinner variants is not scaling
with the spinner.


## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- `ion-spinner` may now be resized by setting the width & height using
CSS for all variants.



## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!-- If this introduces a breaking change, please describe the impact
and migration path for existing applications below. -->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->

### Before

<img width="371" alt="Screenshot 2023-05-08 at 5 17 59 PM"
src="https://user-images.githubusercontent.com/14926794/236937361-b8139bb3-192d-4fbf-839c-f9262b7c112a.png">

### After

<img width="373" alt="Screenshot 2023-05-08 at 5 18 45 PM"
src="https://user-images.githubusercontent.com/14926794/236937508-9a8fa74e-60c8-47d9-9d56-c287da03a33f.png">

---------

Co-authored-by: ionitron <[email protected]>
@ionitron-bot
Copy link

ionitron-bot bot commented Jun 11, 2023

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Jun 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
package: core @ionic/core package type: bug a confirmed bug report
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants