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

fix onHover issue #91

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

essofyany
Copy link
Contributor

#85
Hi there I was working on this issue and I found out that to fix it I have to make some changes:

those changes will affect the homepage shapes positions so please don't merge until repositioned the shapes

  1. Remove some css properties from StyledShape component [ position, top, bottom, left, & right] which inherit their values from the parent (BaseShape).
  2. Set zIndex value to unset instead of -1.
  3. Remove className property from BaseShape component.
  4. Add css property of type string to all shapes, this property is responsible for adding effects to a component like changing color on hover.
 <Heart
          color="red"
          css={`
            &:hover {
              background: orange;
            }
            transition: 0.5s;
          `}
          position="initial"
          size="200px"
        />

Please keep in mind that to change the color of Donut you have to change the border-color property and for CircleGrid you have to change the fill property and not the background.

For example:

<CircleGrid
          color="green"
          css={`
            &:hover {
              fill: orange;
            }
          `}
          position="initial"
          size="100px"
        />

<Donut
          color="yellow"
          css={`
            &:hover {
              border-color: orange;
            }
          `}
          position="initial"
          size="100px"
          width="20px"
        />

@netlify
Copy link

netlify bot commented May 8, 2022

Deploy Preview for awesomeshapes ready!

Name Link
🔨 Latest commit edb4cfa
🔍 Latest deploy log https://app.netlify.com/sites/awesomeshapes/deploys/6278244d27811000089b42d4
😎 Deploy Preview https://deploy-preview-91--awesomeshapes.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@Sachin-chaurasiya
Copy link
Collaborator

@ashutosh1919 , Please review once.

Copy link
Owner

@ashutosh1919 ashutosh1919 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screen Shot 2022-06-05 at 11 15 31 AM

@essofyany why background shapes are scattered all over the place? why did you set zIndex=unset?

@Sachin-chaurasiya , @mohittk please don't merge until the shape positions are undone and the website looks same as the original one.

@essofyany
Copy link
Contributor Author

Hi there. in order to fix onHover issue which is caused by shape position (absolute/relative) also to its parent dimension, so to fix it I had to tweak other properties like z-index and suddenly this affects the positions of the shapes on the homepage.
so please don't merge until repositioning the shapes on the homepage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants