The plugins site is currently in development.
We've been looking to provide a higher-quality, spam-free experience at the plugins site for some time, and a major error on our part forced us to shut down the current site before we could put the new one in place. We are developing a new site, and you can follow along with its development on GitHub. For more information about this transition, including steps you can take as a plugin author to prepare, please read our post about what's going on.
Make use of -moz-border-radius* when applicable
| Project: | Rounded Corners |
| Version: | 0.2 |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
I was wondering why when you've built in support for the native rendering of rounded corners in Safari based (webkit) browsers you haven't added support for native rendering on Gecko-based browsers. Gecko has had their proprietory -moz-border-* properties since gecko 1.7 (firefox 1.0) as far as I can tell.
So I I started working on an addition to support native mozilla rendering and I got it working. The downside though is that I couldn't figure out a way to test for existence of the -moz-border-radius css properties so I had to resort to checking for browser version which of course is far from recommended practice ;/
I was wondering if you didn't implement the support for the same reason or if you had some ideas on how to implement it.
I'm attaching my diff from you originial 0.2 source file
Oh, and btw kickass plugin! ;)
| Attachment | Size |
|---|---|
| jquery.corners.js-mozborder.diff_.txt | 2.58 KB |
- Login to post comments

Comments
#1
Perhaps this would do the trick; I've only tested it in FF3, IE7 and IE6 (windoze)
var o = jQuery('<div>').css('-moz-border-radius', '1px');
mozborderAvailable = $(o).css('-moz-border-radius-topleft') == '1px';
o = null;
The theory is that FF "expands" the composite -moz-border-radius to the four "subproperties" -moz-border-radius-{topleft,topright,bottomleft,bottomright}
Sure, it's ugly but atleast it's not browser version based
#2
Here's an alternative solution, I got it from a guy at stackoverflow in response to a question regarding the cleanest method of checking for moz-border support
var mozborderAvailable = false;try {
if (document.body.style.MozBorderRadius !== undefined)
mozborderAvailable = true;
} catch(err) {}
1. http://beta.stackoverflow.com/questions/18077/the-best-way-of-checking-f...
#3
Adding the latest diff which includes the method mentioned above for CSS detection
#4
When I first started working on this library I briefly tried -moz-border and remember not being happy with the quality. But I see how it may be useful and I'll add support in the next release.
#5
The problem with this is that Firefox 2 does not use anti-aliasing for the borders. The script would need to detect for Firefox 3 before is uses native rounded corners as FF3 does use anti-aliasing.
#6
Great news. Firefox 3 corners are indeed anti-aliased and they look awesome. The new version I'm finishing up will use the moz-border anywhere it's detected unless it's Firefox prior to version 3. It will also fall back to compatibility mode when the X and Y radii are not the same since FF does not support this.
#7
Closing this. Fixed in version 0.3.