-
Notifications
You must be signed in to change notification settings - Fork 663
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
Centering of elements with odd pixel width / height looks off #773
Comments
Nevermind, I'm closing this. Turns out I had my browser zoomed in to 110%, which I'm guessing was generating some pixel rounding error! |
I am reopening this, as it still is generating problems for me, when the element I am adding an outline to is an odd number of pixels. See this test, which adds borders to square spacers of sizes http://share-elm.com/sprout/53ffaf8de4b0d19703e96cf6 I actually could not figure out an obvious way of adding a 1 pixel border to an element whose width and/or height is an odd number of pixels, even after trying various hacks. :( |
from the mailing list discussion:
|
Not sure if this is still relevant, but I am trying to make all the issues here directly about elm-compiler. If you can reproduce this please open an issue or PR on elm-lang/core Mentioning elm-lang/core#332 so folks can find this more easily. |
http://share-elm.com/sprout/53fe3a0ee4b0d19703e96be3
I expect this code to generate a white square with a 1 pixel black border, as I'm adding an extra two pixels to the width and height and placing a white spacer in the center:
Instead, I get, on Chrome:
This is latest Chrome build 36.0.1985.143. This is a Macbook Air with a non-retina display. Specs.
On Safari, there seems to be a similar issue, but it's not noticeable unless I zoom in:
And in Firefox, it looks like what I expect, even on zoom:
The text was updated successfully, but these errors were encountered: