Skip to content
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

CSS transform causes --ggs var to not resize the icon #89

Closed
ecupaio opened this issue Oct 10, 2022 · 1 comment
Closed

CSS transform causes --ggs var to not resize the icon #89

ecupaio opened this issue Oct 10, 2022 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@ecupaio
Copy link

ecupaio commented Oct 10, 2022

If I add a transform to an icon, then --ggs variable will not apply to the icon. I can use scale along with my transform and it works.

App.js

<Spinner className="loading-icon" />

app.css

.loading-icon {
  postion: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%,50%);
  //--ggs does not make the icon larger
  --ggs: 2; 
}

app.css - Working

.loading-icon {
  postion: absolute;
  top: 50%;
  left: 50%;
  //icon is now scaled
  transform: translate(-50%,50%)scale(2);
}

Another alternative is wrapping the icon in a div and adding the transform to the parent div and using --ggs for the child icon.

I created a sandbox so you can see the transform fix in action

@astrit astrit self-assigned this Jun 23, 2023
@astrit astrit added the bug Something isn't working label Jun 23, 2023
@astrit
Copy link
Owner

astrit commented Jun 23, 2023

Not entirely sure what is happening on your version but works for me fine

CleanShot 2023-06-23 at 05 32 54@2x

@astrit astrit closed this as completed Jun 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants