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

traffic light icons on hover #63

Closed
Deep-Codes opened this issue Apr 15, 2021 · 17 comments
Closed

traffic light icons on hover #63

Deep-Codes opened this issue Apr 15, 2021 · 17 comments

Comments

@Deep-Codes
Copy link
Contributor

You mostly know this, traffic lights show icons in hover state.

I tried implementing it looks like this

If you want this implemented let me know I would raise a PR on it.

github

@PuruVJ
Copy link
Owner

PuruVJ commented Apr 15, 2021

OMG!!!! Thank you!!! please do make a PR 🤩🤩

@Deep-Codes
Copy link
Contributor Author

Deep-Codes commented Apr 15, 2021

https://github.com/PuruVJ/macos-web/blob/969df8a3223f5c012143fcd2e7a12b0c06621058/src/components/Desktop/Window/TrafficLights.tsx#L21

I believe here thougth they seem to be in order the naming is not correct:

      <ButtonBase className={css.closeLight} onClick={closeApp} />
      <ButtonBase className={css.stretchLight} />
      <ButtonBase className={css.minimizeLight} />

closeLight -> Red Button
stretchLight -> Green Button
minimizeLight -> Yellow Button

Tho in styles they are styled correctly

and yes i am working on a PR on it ⚡️.

@PuruVJ
Copy link
Owner

PuruVJ commented Apr 15, 2021

Feel free to rename the classes

@PuruVJ
Copy link
Owner

PuruVJ commented Apr 15, 2021

I have no idea which of these do what except for the red one. Use your judgement 😁

@PuruVJ
Copy link
Owner

PuruVJ commented Apr 15, 2021

Hi. Sorry for the inconvenience. I just merged a PR which changes TrafficLights component a bit. Could you pls git pull it and fix the merge conflicts, if any

@Deep-Codes
Copy link
Contributor Author

Alright let me see 👀

@Deep-Codes
Copy link
Contributor Author

@PuruVJ there's a problem

PR merged: It's hiding icons

arent styles scoped?

Screenshot 2021-04-16 at 12 22 20 AM

@PuruVJ
Copy link
Owner

PuruVJ commented Apr 15, 2021

Yes it is hiding styles for me too

@PuruVJ
Copy link
Owner

PuruVJ commented Apr 15, 2021

They are scoped if you use CSS modules

@PuruVJ
Copy link
Owner

PuruVJ commented Apr 15, 2021

Huh, it is CSS modules, but it is still hiding. Strange

@PuruVJ
Copy link
Owner

PuruVJ commented Apr 15, 2021

Oh wait, this lone svg is causing issues. This will not be scoped
image

@PuruVJ
Copy link
Owner

PuruVJ commented Apr 15, 2021

No issues, I'll scope it. No big deal :)

@PuruVJ
Copy link
Owner

PuruVJ commented Apr 15, 2021

Fixed. Will be live soon

@Deep-Codes
Copy link
Contributor Author

Deep-Codes commented Apr 15, 2021

Yeah this would solve it:

.container {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;

  height: 100%;

  &:hover .trafficLight svg {
    visibility: visible;
  }
}

.trafficLight svg {
  visibility: hidden;
}

@PuruVJ
Copy link
Owner

PuruVJ commented Apr 15, 2021

Fixed in #66

@PuruVJ
Copy link
Owner

PuruVJ commented Apr 15, 2021

Hi, Can I ask you your Twitter handle?

@Deep-Codes
Copy link
Contributor Author

Hi, Can I ask you your Twitter handle?

Yeah sure it's @DeepankarBhade

@PuruVJ PuruVJ closed this as completed Apr 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants