Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    decimals in percentage size or position gets truncated

    Hello, I don't see it explicitly mentioned in the docs, but it seems that when using a percent size, if the percent has decimals (ie 33.33333...or 66.66666) they are truncated.

    Is this the case? Is it actually intentional? If yes, may I ask why?

    #2
    We do in fact truncate and only use the integral part of the percent. We actually wouldn't recommend using fractional percents as the browsers have enough errors with rounding as it stands - subpixel rendering and size reporting glitches appear with really trivial HTML - and using fractional percents would probably make those worse.

    However, if it's important to you for some reason, it would be a valid Feature Sponsorship, and not an especially large one, although there would be several different subsystems to upgrade (Canvas, DynamicForm, Layout, grid columns, etc).

    Comment


      #3
      Thanks for the explanation, actually I noticed it while using it with snapTo (size and offset).
      Looking at the HTML I (wrongly) thought that the framework was going to calculate the pixel dimensions anyway, so I didn't understand why it couldn't calculate them exactly.
      In the end I used the exact dimensions in pixels.

      Comment

      Working...
      X