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

UiCheckbox border-radius doesn't hide overflow #471

Closed
hyvyys opened this issue Oct 7, 2019 · 4 comments
Closed

UiCheckbox border-radius doesn't hide overflow #471

hyvyys opened this issue Oct 7, 2019 · 4 comments

Comments

@hyvyys
Copy link
Contributor

hyvyys commented Oct 7, 2019

image
On background other than white it doesn't look too good.

@hyvyys
Copy link
Contributor Author

hyvyys commented Oct 7, 2019

.ui-checkbox__checkmark {
  border-radius: $ui-default-border-radius;
  overflow: hidden;
  &::before {
    border-radius: 0 !important;
  }
}

fixes it, I think. Setting any border-radius to ::before causes an artifact.

@JosephusPaye
Copy link
Owner

The artifact is actually the white background from the .ui-checkbox__checkbox div. ::before is rounded with the border radius, but the div itself isn't.

Can be fixed without overriding the border-radius by:

.ui-checkbox__checkmark {
    border-radius: 0.125rem;
}

PR welcome 🙂

@hyvyys
Copy link
Contributor Author

hyvyys commented Oct 22, 2019

Actually when both elements have the same border-radius, I think there still appears an artifact on their edges — a jagged edge where the browser overlays their antialiased semitransparent pixels.

@JosephusPaye
Copy link
Owner

JosephusPaye commented Oct 23, 2019

Can't seem to reproduce, this is what I see in Chrome on Linux:

image

This is with the browser zoomed in to 250%. At normal zoom it's practically impossible to see.

What browser are you using?

Try adding overflow: hidden as well to .ui-checkbox__checkmark to see if it helps.

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

No branches or pull requests

2 participants