matsubarakentaro / curved-corner

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

feature request : accept border radius css values as paramter #20

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
would be desirable to called it like : 

    behavior: url(border-radius.htc?q="1em 2em 4em 0em");

Or 

    behavior: url(border-radius.htc?q="0 0 0 1em");

or 

    behavior: url(border-radius.htc?q="top-left:3em;");

sometimes i don't use the same border radius measuerments for all browsers.

Original issue reported on code.google.com by airtonix@gmail.com on 29 Dec 2009 at 9:10

GoogleCodeExporter commented 9 years ago
the htc is a file format that can't use querystrings (?key=value). If you want 
to use querystrings you should replace the .htc file with a backend file that 
replaces the values of the border-radius to whatever querystrings you're 
adding. Note that spaces in querystrings could be risky in urls.

The behavior is IE only (correct me if I'm wrong) so I suggest you add a 
conditional comment that includes a separate css file, which also changes your 
radius values for that browser.

example:

<!--[if IE]>
<link rel="Stylesheet" type="text/css" href="ie.css" media="screen" />
<![endif]-->

ie.css includes

.rounded-corner-div {
border-radius: 50px 10px 30px 40px;
behavior: url(border-radius.htc);
}

Original comment by galaxka...@gmail.com on 21 Oct 2010 at 8:33

GoogleCodeExporter commented 9 years ago
Thanks for the explanation, and the proper implementation galaxka... Indeed 
querystrings are not supported by behaviors / HTC.

Currently the code is checking for the standard 'border-radius' property and if 
not found, resorts to various other implementations .... actually, the order in 
which it checks different properties may leave something to be desired in 
v3....  

I tell you what -- in v4, I'll add a special '-ms-border-radius' check where 
you have your IE-specific styles, I'll add it to the top of the list so it will 
be used first if found ....since it's a custom property, it won't have any 
effect unless some javascript (i.e. curved-corner) interacts with it.

Original comment by tyler.wa...@gmail.com on 2 Oct 2011 at 8:28