PolymerElements / paper-radio-button

A Material Design radio button
https://webcomponents.org/element/PolymerElements/paper-radio-button
19 stars 24 forks source link

Use scale instead of pixels, fixes #38 #94

Closed rubenstolk closed 8 years ago

rubenstolk commented 8 years ago

:eyes:

rubenstolk commented 8 years ago

Is this something scheduled?

rubenstolk commented 8 years ago

It looks like this was already fixed in https://github.com/PolymerElements/paper-radio-button/pull/91. That mostly fixes it although the result is not perfect, still a bit off in certain zoom levels.

I wouldn't mind taking a look at it again, but before I do I need to know if there is a chance of getting a merged, so someone please let me know!

@hotforfeature @bicknellr @notwaldorf

FYI these are screenshots from 90% and 110% in Chrome with the current master branch, definitely better than before but I would still vote for what I suggested with this PR:

screen shot 2016-06-09 at 19 50 56 screen shot 2016-06-09 at 19 51 06
hotforfeature commented 8 years ago

I don't see why not, it may even be easier now. I haven't tried it myself, but if you set #onRadio width and height to 100%, then the checked state to scale(0.5) using the current master branch, I think that'd accomplish what you were going for.

rubenstolk commented 8 years ago

@hotforfeature @bicknellr I've updated this PR:

bicknellr commented 8 years ago

It's better but I'm still seeing a lot of rendering inconsistency; here's what it looks like 90%: screen shot 2016-06-10 at 14 09 21 screen shot 2016-06-10 at 14 08 10 screen shot 2016-06-10 at 14 10 00 To really squash this bug, I think we need to switch to SVG from divs. All of this seems to result from each browser's individual behavior for aligning boxes with device pixels to prevent border anti-aliasing.

rubenstolk commented 8 years ago

@bicknellr that's true but at least now we have the best situation that can be achieved with HTML/CSS. I agree that svg is better but with this PR in I wouldn't consider it as a bug anymore as it just behaves like anything else on zoom levels. We would be as good as something like https://material.angularjs.org/latest/demo/radioButton now.

bicknellr commented 8 years ago

I think that's a reasonable argument. I filed #96 about converting to SVG, but, like you said, this is probably as good as it gets without leaving HTML/CSS.

bicknellr commented 8 years ago

LGTM, thanks!