Not really...
setStyle('border') would appy the sample logic and accept the 4 border
strings.

On Sat, Sep 27, 2008 at 3:23 AM, Iván N Paz <[EMAIL PROTECTED]> wrote:

> Actually that would be pretty weird... I mean...
>
> Before getting the style of a source object and applying it to another
> (lets call it the target), you know beforehand that you will ever need
> that style (in this case, the borders) and will know the possible
> combinations that the source object will have as well... you will
> already know if the borders are different, if they have different
> width, color, 'solidness', etc.. otherwise you wouldnt be sampling it
> just like that...
>
> In that case, if you dont really control the style of the source
> object, just to be on the safe side, you would have to do:
>
> var styles = $('source_id').getStyles('border-top', 'border-right',
> 'border-bottom', 'border-left'));
> $('target_id').setStyles(styles);
>
>
>
>
> On Sat, Sep 27, 2008 at 1:12 AM, jon <[EMAIL PROTECTED]> wrote:
> >
> > I meant to say el.setStyle('border',el2.getStyle('border')) doesn't
> > always work if el2.getStyle('border') returns more than 3 space
> > delimited tokens.  But I guess it's too much to ask mootools to fix
> > this css problem with javascript.. or is it?
> >
> > On Sep 26, 11:09 pm, jon <[EMAIL PROTECTED]> wrote:
> >> I see, one issue is that if I call
> >> $('test').setStyle('border','0px none #000000 0px none #000000 0px
> >> none #000000 0px none #000000'); it won't work,
> >> I have to do setStyle('border','0px none #000000'), it seems
> >> inconsistent that el.setStyle('border',el.getStyle('border')) doesn't
> >> work in these cases.
> >>
> >> On Sep 26, 8:15 pm, cheeaun <[EMAIL PROTECTED]> wrote:
> >>
> >> > On Sep 27, 9:46 am, jon <[EMAIL PROTECTED]> wrote:
> >>
> >> > > sometimes I call el.getStyle('border') and get '0px none #000000 0px
> >> > > none #000000 0px none #000000 0px none #000000', it's repeated.  Has
> >> > > anyone gotten this problem? is this a bug?
> >>
> >> > No, it's not a bug. That is actually the correct way of returning the
> >> > values, just in case someone applied something like this:
> >>
> >> > element {
> >> > border-top: 2px solid red;
> >> > border-right: 1px dashed blue;
> >> > border-bottom: 3px groove green;
> >> > border-left: 4px double yellow;
> >>
> >> > }
> >>
> >> > .. so, it should return all the 4 types of border widths, styles and
> >> > colors.
> >>
> >> > Hope this helps.
> >
>
>
>
> --
> ◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦
> www.ivanicus.com
>



-- 
Guillermo Rauch
http://devthought.com

Reply via email to