hl-web / curved-corner

Automatically exported from code.google.com/p/curved-corner
0 stars 0 forks source link

No support for declaring border-radius in EM, % or PT? #49

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
To reproduce the problem:
1. Create an element in your HTML page
2. Style it to have a border radius declared in something other than pixels (px)

If ems/%s/pts were supported we we see nice round corners that look the same as 
rendered in modern browsers. Instead we see the corners have a different 
radius. (smaller than expected)

This could be quite easily fixed by checking what kind of unit was used 
declaring the radius and acting accordingly. For em/pt the simplest thing would 
be to multiply the size by 16 or 1.3333, respectively (Average conversion, 
assuming 96 dpi, not taking into account font-size and OS differences). For 
percentages this poses a whole new problem, since the code uses a VML 
roundrect, we can't create different radii for different corners. This can be 
achieved if support for single corners was added as implemented in the 
attachment to single Issue 22. In that case we could just get element 
height/width and calculate the percentages ourselves.

Original issue reported on code.google.com by benpeachey on 10 Aug 2010 at 11:35