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

Fixed pointer fill not being aligned in the center #175

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,10 @@
.react-colorful__pointer-fill,
.react-colorful__alpha-gradient {
content: "";
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
pointer-events: none;
border-radius: inherit;
width: 90%;
height: 90%;
Copy link
Owner

Choose a reason for hiding this comment

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

Сan we keep 100% here so the design will remain the same? The component is used on dozens of thousands of projects. I wouldn't change their look.

Copy link
Author

Choose a reason for hiding this comment

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

I replaced flexbox with a simple border to the element instead, i noticed that the parent element could probably be removed but that might break compatibility with people who modified the styling.

}

/* Improve elements rendering on light backgrounds */
Expand Down Expand Up @@ -83,6 +80,9 @@
border: 2px solid #fff;
border-radius: 50%;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
display: flex;
justify-content: center;
align-items: center;
}

.react-colorful__interactive:focus .react-colorful__pointer {
Expand Down