You can always wrap .css() with your own function that checks for borderRadius.
-- dz On Sun, Feb 8, 2009 at 3:28 AM, Daniel Friesen <[email protected]> wrote: > > I know, and that's why I suggested putting partially supported fixes > inside of a plugin for people that want them. But creating a new > .borderRadius function is not a plugin that fixes partial-compatibility, > it's just another plugin. Why should someone need to use a plugin method > when .css({borderRadius:10}) by w3 draft is valid. This is what people > will be using in the future when borderRadius gets adopted more, not > some border radius plugin. Why create workaround syntax when we could > just allow a plugin to extend .css and fix compatibility when someone > asks for it? > > ~Daniel Friesen (Dantman, Nadir-Seen-Fire) [http://nadir-seen-fire.com] > -Nadir-Point (http://nadir-point.com) > -Wiki-Tools (http://wiki-tools.com) > -MonkeyScript (http://monkeyscript.nadir-point.com) > -Animepedia (http://anime.wikia.com) > -Narutopedia (http://naruto.wikia.com) > -Soul Eater Wiki (http://souleater.wikia.com) > > > > David Zhou wrote: >> While that's true, I think John's point was that since IE doesn't >> support it, it shouldn't belong in core for now. With opacity, >> there's a work around with the alpha filter. Is there anything like >> that for border radius? If not, then it violates jQuery's intention >> that all features work on all supported browsers. >> >> -- dz >> >> >> >> On Sun, Feb 8, 2009 at 2:36 AM, Daniel Friesen >> <[email protected]> wrote: >> >>> .show()/.hide() is an extremely common action with purpose outside of >>> the mental scope of changing css values "I want to [show|hide] >>> something." and abstracts that purpose. As well it expands itself to the >>> purpose of animating the show/hide transition (it would be nice if you >>> could customize that instead of rolling new methods for everything). And >>> .show/.hide is not a simple wrapper around .css({display:...}), it is a >>> complex action that tracks previous display state and ensures old values >>> are restored correctly. >>> >>> borderRadius is a simple standardized css property which only makes >>> sense to be used in the context of .css() where most likely is it not >>> going to be the only css property being modified. A translation of >>> .css({borderRadius:10}); to .css({borderRadius:10, MozBorderRadius:10, >>> WebkitBorderRadius:10}); is akin to how .css({opacity:.5}) is translated >>> to applying filter:alpha(opacity=50); in IE. >>> >>> Ideally there would be more cases where we could do something similar to >>> the jquery.color.js plugin. In that case normally >>> $.animate({backgroundColor:'blue'}) will not work in jQuery. But if you >>> need to do that, you just throw an inclusion to jquery.color.js into >>> your header and voila, it works. >>> >>> ~Daniel Friesen (Dantman, Nadir-Seen-Fire) [http://nadir-seen-fire.com] >>> -Nadir-Point (http://nadir-point.com) >>> -Wiki-Tools (http://wiki-tools.com) >>> -MonkeyScript (http://monkeyscript.nadir-point.com) >>> -Animepedia (http://anime.wikia.com) >>> -Narutopedia (http://naruto.wikia.com) >>> -Soul Eater Wiki (http://souleater.wikia.com) >>> >>> David Zhou wrote: >>> >>>> Things like .hide() also modify css properties, so I don't see any >>>> aesthetic issue with borderRadius(). >>>> >>>> -- dz >>>> >>>> >>>> >>>> On Sun, Feb 8, 2009 at 12:39 AM, Daniel Friesen >>>> <[email protected]> wrote: >>>> >>>> >>>>> Well, for a plugin I honestly don't like the idea of being forced to use >>>>> something like $('#foo').borderRadius(5); when really you're modifying a >>>>> css property which would correctly be set with >>>>> $('#foo').css({borderRadius: 5}); >>>>> >>>>> If that's the policy then could we tweak .css/curCSS to allow plugins to >>>>> extend handling of css properties. >>>>> Then instead of handling it in core we could create a class of plugins >>>>> to enable support for things that might not always work when people >>>>> understand that but still want to make use of the feature. >>>>> >>>>> >>>>> Though, to be honest I don't see how this does much harm. All it's >>>>> really doing is taking borderRadius (w3 draft) and enabling >>>>> compatibility (MozBorderRadius, WebkitBorderRaidus) when it's supported. >>>>> I honestly consider this better than forcing people to shove >>>>> .css({MozBorderRadius: 10, WebkitBorderRaidus: 10}) inside their code >>>>> when they could use .css({borderRadius: 10}); and be future proof for >>>>> when other browsers start supporting it, without needing to go and edit >>>>> half their code once browser support changes. >>>>> >>>>> ~Daniel Friesen (Dantman, Nadir-Seen-Fire) [http://nadir-seen-fire.com] >>>>> -Nadir-Point (http://nadir-point.com) >>>>> -Wiki-Tools (http://wiki-tools.com) >>>>> -MonkeyScript (http://monkeyscript.nadir-point.com) >>>>> -Animepedia (http://anime.wikia.com) >>>>> -Narutopedia (http://naruto.wikia.com) >>>>> -Soul Eater Wiki (http://souleater.wikia.com) >>>>> >>>>> >>>>> >>>>> John Resig wrote: >>>>> >>>>> >>>>>> I agree. We have a pretty solid policy in jQuery: Any feature that we >>>>>> guarantee that it'll work in every browser that we support. That >>>>>> pretty much cuts out border radius, for now. But yeah, a plugin would >>>>>> be great here. >>>>>> >>>>>> --John >>>>>> >>>>>> >>>>>> >>>>>> On Sun, Feb 8, 2009 at 12:17 AM, David Zhou <[email protected]> wrote: >>>>>> >>>>>> >>>>>> >>>>>>> Wouldn't this be better as a plugin? >>>>>>> >>>>>>> >>>>>>> -- dz >>>>>>> >>>>>>> >>>>>>> >>>>>>> On Sun, Feb 8, 2009 at 12:03 AM, Daniel Friesen >>>>>>> <[email protected]> wrote: >>>>>>> >>>>>>> >>>>>>> >>>>>>>> Both Mozilla and WebKit have built support for border radius (meaning >>>>>>>> now only IE and Opera should be left without this kind of feature): >>>>>>>> Mozilla with -moz-border-radius and -moz-border-radius-topleft >>>>>>>> WebKit with -webkit-border-radius and -webkit-border-top-left-radius >>>>>>>> >>>>>>>> As well there is a w3 working draft standardizing border-radius and >>>>>>>> border-top-left-radius. >>>>>>>> http://www.w3.org/TR/css3-background/#the-border-radius >>>>>>>> >>>>>>>> >>>>>>>> I'm considering writing a patch to jQuery (that can be committed into >>>>>>>> trunk) to enable support for a cross-browser border-radius in .css(). >>>>>>>> ie: .css({borderRadius: 10, borderTopLeftRadius: 15}); >>>>>>>> >>>>>>>> >>>>>>>> The question here. Is should I enhance $.support with tests for >>>>>>>> border-radius, -moz-border-radius, and -webkit-border-radius or should >>>>>>>> I >>>>>>>> just have .css borderRadius set all 3 versions at once? >>>>>>>> >>>>>>>> -- >>>>>>>> ~Daniel Friesen (Dantman, Nadir-Seen-Fire) [http://nadir-seen-fire.com] >>>>>>>> -Nadir-Point (http://nadir-point.com) >>>>>>>> -Wiki-Tools (http://wiki-tools.com) >>>>>>>> -MonkeyScript (http://monkeyscript.nadir-point.com) >>>>>>>> -Animepedia (http://anime.wikia.com) >>>>>>>> -Narutopedia (http://naruto.wikia.com) >>>>>>>> -Soul Eater Wiki (http://souleater.wikia.com) >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >> >> > >> > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jQuery Development" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en -~----------~----~----~----~------~----~------~--~---
